You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Latest Mac binaries](https://github.com/cloudimmunity/docker-slim/releases/download/1.14/dist_mac.zip)
67
-
-[Latest Linux binaries](https://github.com/cloudimmunity/docker-slim/releases/download/1.14/dist_linux.zip)
69
+
-[Latest Mac binaries](https://github.com/cloudimmunity/docker-slim/releases/download/1.15/dist_mac.zip)
70
+
-[Latest Linux binaries](https://github.com/cloudimmunity/docker-slim/releases/download/1.15/dist_linux.zip)
68
71
2. Unzip the package.
69
72
3. Add the location where you unzipped the package to your PATH environment variable (optional).
70
73
@@ -100,7 +103,7 @@ You can use the generated Seccomp profile with your original image or with the m
100
103
101
104
You can use the generated profile with your original image or with the minified image DockerSlim created:
102
105
103
-
`docker run --security-opt seccomp:path_to/my-sample-node-app-seccomp.json -p 8000:8000 my/sample-node-app.slim`
106
+
`docker run -it --rm --security-opt seccomp:path_to/my-sample-node-app-seccomp.json -p 8000:8000 my/sample-node-app.slim`
104
107
105
108
## ORIGINAL DEMO VIDEO
106
109
@@ -112,52 +115,52 @@ You can use the generated profile with your original image or with the minified
112
115
113
116
The demo run on Mac OS X, but you can build a linux version. Note that these steps are different from the steps in the demo video.
114
117
115
-
0. Get the docker-slim [Mac](https://github.com/cloudimmunity/docker-slim/releases/download/1.14/dist_mac.zip) or [Linux](https://github.com/cloudimmunity/docker-slim/releases/download/1.14/dist_linux.zip) binaries. Unzip them and optionally add their directory to your PATH environment variable if you want to use the app from other locations.
118
+
1. Get the docker-slim [Mac](https://github.com/cloudimmunity/docker-slim/releases/download/1.15/dist_mac.zip) or [Linux](https://github.com/cloudimmunity/docker-slim/releases/download/1.15/dist_linux.zip) binaries. Unzip them and optionally add their directory to your PATH environment variable if you want to use the app from other locations.
116
119
117
-
The extracted directory contains two binaries:
120
+
The extracted directory contains two binaries:
118
121
119
-
* `docker-slim` <- the main application
120
-
* `docker-slim-sensor` <- the sensor application used to collect information from running containers
122
+
*`docker-slim` <- the main application
123
+
*`docker-slim-sensor` <- the sensor application used to collect information from running containers
121
124
122
-
1. Clone this repo to use the sample apps. You can skip this step if you have your own app.
125
+
2. Clone this repo to use the sample apps. You can skip this step if you have your own app.
2. Create a Docker image for the sample node.js app in `sample/apps/node`. You can skip this step if you have your own app.
129
+
3. Create a Docker image for the sample node.js app in `sample/apps/node`. You can skip this step if you have your own app.
127
130
128
-
`cd docker-slim/sample/apps/node`
131
+
`cd docker-slim/sample/apps/node`
129
132
130
-
`eval "$(docker-machine env default)"` <- optional (depends on how Docker is installed on your machine); if the Docker host is not running you'll need to start it first: `docker-machine start default`; see the `Docker connect options` section for more details.
133
+
`eval "$(docker-machine env default)"` <- optional (depends on how Docker is installed on your machine); if the Docker host is not running you'll need to start it first: `docker-machine start default`; see the `Docker connect options` section for more details.
131
134
132
-
`docker build -t my/sample-node-app .`
135
+
`docker build -t my/sample-node-app .`
133
136
134
-
3. Run `docker-slim`:
137
+
4. Run `docker-slim`:
135
138
136
-
`./docker-slim build --http-probe my/sample-node-app` <- run it from the location where you extraced the docker-slim binaries (or update your PATH env var to include the `docker-slim` bin directory)
139
+
`./docker-slim build --http-probe my/sample-node-app` <- run it from the location where you extraced the docker-slim binaries (or update your PATH env var to include the `docker-slim` bin directory)
137
140
138
-
DockerSlim creates a special container based on the target image you provided. It also creates a resource directory where it stores the information it discovers about your image: `<docker-slim directory>/.images/<TARGET_IMAGE_ID>`.
141
+
DockerSlim creates a special container based on the target image you provided. It also creates a resource directory where it stores the information it discovers about your image: `<docker-slim directory>/.images/<TARGET_IMAGE_ID>`.
139
142
140
-
4. Use curl (or other tools) to call the sample app (optional)
143
+
5. Use curl (or other tools) to call the sample app (optional)
141
144
142
-
`curl http://<YOUR_DOCKER_HOST_IP>:<PORT>`
145
+
`curl http://<YOUR_DOCKER_HOST_IP>:<PORT>`
143
146
144
-
This is an optional step to make sure the target app container is doing something. Depending on the application it's an optional step. For some applications it's required if it loads new application resources dynamically based on the requests it's processing.
147
+
This is an optional step to make sure the target app container is doing something. Depending on the application it's an optional step. For some applications it's required if it loads new application resources dynamically based on the requests it's processing.
145
148
146
-
You can get the port number either from the `docker ps` or `docker port <CONTAINER_ID>` commands. The current version of DockerSlim doesn't allow you to map exposed network ports (it works like `docker run … -P`).
149
+
You can get the port number either from the `docker ps` or `docker port <CONTAINER_ID>` commands. The current version of DockerSlim doesn't allow you to map exposed network ports (it works like `docker run … -P`).
147
150
148
-
If you set the `http-probe` flag then `docker-slim` will try to call your application using HTTP/HTTPS: `./docker-slim build --http-probe my/sample-node-app`
151
+
If you set the `http-probe` flag then `docker-slim` will try to call your application using HTTP/HTTPS: `./docker-slim build --http-probe my/sample-node-app`
149
152
150
-
5. Press <enter> and wait until `docker-slim` says it's done
153
+
6. Press <enter> and wait until `docker-slim` says it's done
151
154
152
-
6. Once DockerSlim is done check that the new minified image is there
155
+
7. Once DockerSlim is done check that the new minified image is there
153
156
154
-
`docker images`
157
+
`docker images`
155
158
156
-
You should see `my/sample-node-app.slim` in the list of images. Right now all generated images have `.slim` at the end of its name.
159
+
You should see `my/sample-node-app.slim` in the list of images. Right now all generated images have `.slim` at the end of its name.
157
160
158
-
7. Use the minified image
161
+
8. Use the minified image
159
162
160
-
`docker run --name="slim_node_app" -p 8000:8000 my/sample-node-app.slim`
163
+
`docker run -it --rm --name="slim_node_app" -p 8000:8000 my/sample-node-app.slim`
161
164
162
165
## USAGE DETAILS
163
166
@@ -171,11 +174,13 @@ Commands:
171
174
172
175
Global options:
173
176
177
+
*` --version` - print the version
174
178
*` --debug` - enable debug logs
175
179
*`--host` - Docker host address
176
180
*`--tls` - use TLS connecting to Docker
177
181
*`--tls-verify` - do TLS verification
178
182
*`--tls-cert-path` - path to TLS cert files
183
+
*`--state-path value` - DockerSlim state base path (must set it if the DockerSlim binaries are not in a writable directory!)
179
184
180
185
### `BUILD` COMMAND OPTIONS
181
186
@@ -257,7 +262,8 @@ Commands in `probeCmds.json`:
257
262
{
258
263
"protocol": "http",
259
264
"method": "POST",
260
-
"resource": "/submit2"
265
+
"resource": "/submit2",
266
+
"body": "key=value"
261
267
}
262
268
]
263
269
}
@@ -299,11 +305,11 @@ You can also run `docker-slim` in the `info` mode and it'll generate useful imag
299
305
300
306
DockerSlim now also generates Seccomp (usable) and AppArmor (WIP) profiles for your container.
301
307
302
-
Works with Docker 1.8, 1.9and 1.10.
308
+
Works with Docker 1.8, 1.9, 1.10 and 1.11.
303
309
304
310
Note:
305
311
306
-
You don't need Docker 1.10 to generate Seccomp profiles, but you do need it if you want to use the generated profiles.
312
+
You don't need Docker 1.10 or above to generate Seccomp profiles, but you do need it if you want to use the generated profiles.
307
313
308
314
## FAQ
309
315
@@ -329,9 +335,9 @@ You can explore the artifacts DockerSlim generates when it's creating a slim ima
329
335
330
336
If you'd like to see the artifacts without running `docker-slim` you can take a look at the `sample/artifacts` directory in this repo. It doesn't include any image files, but you'll find:
0 commit comments