From b5aef546a575de242b2c3ace97e1fc11f028b137 Mon Sep 17 00:00:00 2001 From: Kyle Quest Date: Sun, 4 Aug 2019 08:59:08 -0700 Subject: [PATCH] 1.25.3 release info --- CHANGELOG.md | 10 ++++++++++ README.md | 15 +++++++++------ internal/app/master/commands/build.go | 2 ++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d13243fbc..6a72412534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.25.3 (8/4/2019) + +### New Features + +* Build minified images from `source` using the new `--from-dockerfile` build flag (see `README.md` for details). + +### Improvements + +* Custom HTTP POST probes support request bodies + ## 1.25.2 (7/21/2019) ### New Features diff --git a/README.md b/README.md index 7438c10feb..e5b7d7871b 100755 --- a/README.md +++ b/README.md @@ -127,16 +127,16 @@ Note: The examples are in a separate repository: [https://github.com/docker-slim ## RECENT UPDATES -Latest version: 1.25.2 (7/21/2019) +Latest version: 1.25.3 (8/4/2019) -Now you can generate enhanced build reports with additional container image metadata and rewrite some of the generated Docker image instructions! For more info about the latest release see the [`CHANGELOG`](CHANGELOG.md). +Now you can build minified images from the original Dockerfile (no need to create a separate fat container first). For more info about the latest release see the [`CHANGELOG`](CHANGELOG.md). ## INSTALLATION 1. Download the zip package for your platform. - - [Latest Mac binaries](https://downloads.dockerslim.com/releases/1.25.2/dist_mac.zip) - - [Latest Linux binaries](https://downloads.dockerslim.com/releases/1.25.2/dist_linux.tar.gz) - - [Latest Linux ARM binaries](https://downloads.dockerslim.com/releases/1.25.2/dist_linux_arm.tar.gz) + - [Latest Mac binaries](https://downloads.dockerslim.com/releases/1.25.3/dist_mac.zip) + - [Latest Linux binaries](https://downloads.dockerslim.com/releases/1.25.3/dist_linux.tar.gz) + - [Latest Linux ARM binaries](https://downloads.dockerslim.com/releases/1.25.3/dist_linux_arm.tar.gz) 2. Unzip the package. 3. Add the location where you unzipped the package to your PATH environment variable (optional). @@ -182,7 +182,7 @@ You can use the generated profile with your original image or with the minified 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. -1. Get the docker-slim [Mac](https://downloads.dockerslim.com/releases/1.25.2/dist_mac.zip), [Linux](https://downloads.dockerslim.com/releases/1.25.2/dist_linux.tar.gz) or [Linux ARM](https://downloads.dockerslim.com/releases/1.25.2/dist_linux_arm.tar.gz) binaries. Unzip them and optionally add their directory to your PATH environment variable if you want to use the app from other locations. +1. Get the docker-slim [Mac](https://downloads.dockerslim.com/releases/1.25.3/dist_mac.zip), [Linux](https://downloads.dockerslim.com/releases/1.25.3/dist_linux.tar.gz) or [Linux ARM](https://downloads.dockerslim.com/releases/1.25.3/dist_linux_arm.tar.gz) binaries. Unzip them and optionally add their directory to your PATH environment variable if you want to use the app from other locations. The extracted directory contains two binaries: @@ -294,6 +294,7 @@ To disable the version checks set the global `--check-version` flag to `false` ( * `--container-dns` - add a dns server analyzing image [zero or more] * `--container-dns-search` - add a dns search domain for unqualified hostnames analyzing image [zero or more] * `--continue-after` - Select continue mode: enter | signal | probe | timeout or numberInSeconds (default: enter) +* `--from-dockerfile` - The source Dockerfile name to build the fat image before it's minified. The `--include-path` option is useful if you want to customize your minified image adding extra files and directories. The `--include-path-file` option allows you to load multiple includes from a newline delimited file. Use this option if you have a lot of includes. The includes from `--include-path` and `--include-path-file` are combined together. Future versions will also include the `--exclude-path` option to have even more control. @@ -301,6 +302,8 @@ The `--continue-after` option is useful if you need to script `docker-slim`. If The `--include-shell` option provides a simple way to keep a basic shell in the minified container. Not all shell commands are included. To get additional shell commands or other command line utilities use the `--include-exe' and/or `--include-bin' options. Note that the extra apps and binaries might missed some of the non-binary dependencies (which don't get picked up during static analysis). For those additional dependencies use the `--include-path` and `--include-path-file` options. +The `--from-dockerfile` option makes it possible to build a new minified image directly from source Dockerfile. Pass the Dockerfile name as the value for this flag and pass the build context directory or URL instead of the docker image name as the last parameter for the `docker-slim` build command: `docker-slim build --from-dockerfile Dockerfile --tag my/custom_minified_image_name .` If you want to see the console output from the build stages (when the fat and slim images are built) add the `--show-blogs` build flag. Note that the build console output is not interactive and it's printed only after the corresponding build step is done. The fat image created during the build process has the `.fat` suffix in its name. If you specify a custom image tag (with the `--tag` flag) the `.fat` suffix is added to the name part of the tag. If you don't provide a custom tag the generated fat image name will have the following format: `docker-slim-tmp-fat-image..`. The minified image name will have the `.slim` suffix added to that auto-generated container image name (`docker-slim-tmp-fat-image...slim`). Take a look at this [python examples](https://github.com/docker-slim/examples/tree/master/python_ubuntu_18_py27_from_dockerfile) to see how it's using the `--from-dockerfile` flag. + ## DOCKER CONNECT OPTIONS If you don't specify any Docker connect options `docker-slim` expects to find the following environment variables: `DOCKER_HOST`, `DOCKER_TLS_VERIFY` (optional), `DOCKER_CERT_PATH` (required if `DOCKER_TLS_VERIFY` is set to `"1"`) diff --git a/internal/app/master/commands/build.go b/internal/app/master/commands/build.go index a0707d3a9e..d3092fe7d7 100644 --- a/internal/app/master/commands/build.go +++ b/internal/app/master/commands/build.go @@ -97,6 +97,8 @@ func OnBuild( os.Getpid(), time.Now().UTC().Format("20060102150405")) } + fmt.Printf("docker-slim[build]: info=basic.image.name value=%s\n", fatImageRepoNameTag) + fatBuilder, err := builder.NewBasicImageBuilder(client, fatImageRepoNameTag, buildFromDockerfile,