Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Oct 20, 2019

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>
@thaJeztah thaJeztah changed the title [WIP][master] Dockerfiles: re-use DISTRO, SUITE build-args where possible [master] Dockerfiles: re-use DISTRO, SUITE build-args where possible Oct 20, 2019
@thaJeztah
Copy link
Member Author

ping @seemethere @zelahi ptal 🤗

@thaJeztah
Copy link
Member Author

ping @StefanScherer @andrewhsu @seemethere ptal

Copy link
Member

@StefanScherer StefanScherer left a comment

Choose a reason for hiding this comment

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

LGTM

@seemethere seemethere 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:master Oct 29, 2019
@thaJeztah thaJeztah deleted the distro_suite_args branch October 29, 2019 01:18
Sign up for free to 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