-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtodo.txt
More file actions
91 lines (61 loc) · 3.22 KB
/
todo.txt
File metadata and controls
91 lines (61 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
TODO:
- add floating help text for fields
- create container screen
add option to attach volumes
- the way that i force ratchet to flush the write stream sucks. (but i don't know better).
- ratchet: 'Closed without sending a request; it was probably just an unused speculative preconnection'
- for logs: helps to add the time - 10m (url differs each time)
DONE:
- must have some form of TLS
- container: must do TLS. Look how to run the show with apache.
https://hub.docker.com/_/php
FROM php:7.2-apache
COPY src/ /var/www/html/
docker run -d -p 80:80 --name my-apache-php-app -v "$PWD":/var/www/html php:7.2-apache
--- docker create options
- general screens: add checkbox for 'show all containers/images' (-a option)
-- error when trying to run shell, and shell doesn't exist.
"OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown"
Need to copy statically compiled shell to container and run it!
-- Show progress while pulling an image!
- pull image
JSON=$(echo '{"username": "string", "password": "string", "serveraddress": "string"}' | base64)
curl --unix-socket /var/run/docker.sock \
-H "Content-Type: application/tar"
-X POST "http://localhost/v1.41/images/create?fromImage=alpine"
-H "X-Registry-Auth"
-d "${JSON}"
curl -vv --unix-socket /var/run/docker.sock -H "Content-Type: application/tar" -X POST "http://localhost/v1.41/images/create?fromImage=blabla7" -H "X-Registry-Auth" -d "${JSON}"
curl -vvv --unix-socket /var/run/docker.sock -H "Content-Type: application/tar" -X POST "http://localhost/v1.41/images/create?fromImage=ubuntu" -H "X-Registry-Auth" -d "${JSON}"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying /var/run/docker.sock:0...
* Connected to localhost (/Users/mmoser/.docker/run/docker.sock) port 80 (#0)
> POST /v1.41/images/create?fromImage=ubuntu HTTP/1.1
> Host: localhost
> User-Agent: curl/7.79.1
> Accept: */*
> Content-Type: application/tar
> Content-Length: 96
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Api-Version: 1.41
< Content-Type: application/json
< Date: Mon, 21 Nov 2022 05:00:00 GMT
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/20.10.17 (linux)
< Transfer-Encoding: chunked
https://docs.docker.com/engine/api/v1.41/#section/Authentication
sent as X-Registry-Auth header as a base64url encoded (JSON) stringA
{
"username": "string",
"password": "string",
"email": "string",
"serveraddress": "string"
}
The serveraddress is a domain/IP without a protocol. Throughout this structure, double quotes are required.
If you have already got an identity token from the /auth endpoint, you can just pass this instead of credentials:
{
"identitytoken": "9cbaf023786cd7..."
}