Skip to content

[master] Dockerfiles: re-use DISTRO, SUITE build-args where poss… - #403

Merged
seemethere merged 1 commit into
docker:masterfrom
thaJeztah:distro_suite_args
Oct 29, 2019
Merged

[master] Dockerfiles: re-use DISTRO, SUITE build-args where poss…#403
seemethere merged 1 commit into
docker:masterfrom
thaJeztah:distro_suite_args

Conversation

@thaJeztah

@thaJeztahthaJeztah commented Oct 20, 2019

Copy link
Copy Markdown
Member

based on top of #399 - I'll rebase once that's merged. done

Re-use these build-args, so that there's only one place to set them per Dockerfile.

To verify this change:

Check if the env-vars are set on the image:

make UBUNTU_VERSIONS=ubuntu-bionic DEBIAN_VERSIONS="" RASPBIAN_VERSIONS="" CLI_DIR=$GOPATH/src/github.com/docker/cli ENGINE_DIR=$GOPATH/src/github.com/docker/docker deb
docker image inspect debbuild-ubuntu-bionic/x86_64 --format '{{json .Config.Env }}'| jq .

Which should output something like;

[
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin",
"GOPROXY=direct",
"GO111MODULE=off",
"GOPATH=/go",
"DOCKER_BUILDTAGS=apparmor seccomp selinux",
"RUNC_BUILDTAGS=apparmor seccomp selinux",
"DISTRO=ubuntu",
"SUITE=bionic"
]

Re-use these build-args, so that there's only one place to set them per Dockerfile.
To verify this change:
Check if the env-vars are set on the image:
```bash
make UBUNTU_VERSIONS=ubuntu-bionic DEBIAN_VERSIONS="" RASPBIAN_VERSIONS="" CLI_DIR=$GOPATH/src/github.com/docker/cli ENGINE_DIR=$GOPATH/src/github.com/docker/docker deb
docker image inspect debbuild-ubuntu-bionic/x86_64 --format '{{json .Config.Env }}' | jq .
```
Which should output something like;
```json
[
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin",
"GOPROXY=direct",
"GO111MODULE=off",
"GOPATH=/go",
"DOCKER_BUILDTAGS=apparmor seccomp selinux",
"RUNC_BUILDTAGS=apparmor seccomp selinux",
"DISTRO=ubuntu",
"SUITE=bionic"
]
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztahthaJeztah changed the title [WIP][master] Dockerfiles: re-use DISTRO, SUITE build-args where possible[master] Dockerfiles: re-use DISTRO, SUITE build-args where possibleOct 20, 2019
@thaJeztah

Copy link
Copy Markdown
MemberAuthor

ping @seemethere@zelahi ptal 🤗

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

@StefanSchererStefanScherer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seemethereseemethere changed the title [master] Dockerfiles: re-use DISTRO, SUITE build-args where possible[master] Dockerfiles: re-use DISTRO, SUITE build-args where poss…Oct 29, 2019
@seemethere
seemethere merged commit f91c8c6 into docker:masterOct 29, 2019
@thaJeztah
thaJeztah deleted the distro_suite_args branch October 29, 2019 01:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@thaJeztah@StefanScherer@zelahi@seemethere