Skip to content

Commit a7e9df8

Browse files
committed
docker/release: Move to distribution directory (#40460)
Signed-off-by: Ryan Northey <[email protected]>
1 parent c83e0dc commit a7e9df8

File tree

10 files changed

+58
-9
lines changed

10 files changed

+58
-9
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
!/VERSION.txt
33
!/build_envoy
44
!/ci
5+
!/distribution/docker
56
!/configs/google-vrp
67
!/configs/*yaml
78
!/linux/amd64/release.tar.zst

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ updates:
3434
interval: daily
3535
time: "06:00"
3636

37+
- package-ecosystem: "docker"
38+
directory: "/distribution/docker"
39+
schedule:
40+
interval: daily
41+
time: "06:00"
42+
3743
- package-ecosystem: "github-actions"
3844
directory: "/"
3945
schedule:

ci/do_ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ case $CI_TARGET in
596596
# then load to Docker (ie local build)
597597
export DOCKER_LOAD_IMAGES=1
598598
fi
599-
"${ENVOY_SRCDIR}/ci/docker_ci.sh"
599+
"${ENVOY_SRCDIR}/distribution/docker/docker_ci.sh"
600600
;;
601601

602602
dockerhub-publish)

ci/docker_rebuild_google-vrp.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Script to rebuild Dockerfile-envoy-google-vrp locally (i.e. not in CI) for development purposes.
3+
# Script to rebuild Dockerfile-envoy google-vrp target locally (i.e. not in CI) for development purposes.
44
# This makes use of the latest envoy:dev base image on Docker Hub as the base and takes an
55
# optional local path for an Envoy binary. When a custom local Envoy binary is used, the script
66
# switches to using ${BASE_DOCKER_IMAGE} for the build, which should be configured to provide
@@ -22,7 +22,7 @@ set -e
2222
# Don't use the local envoy:dev, but pull from Docker Hub instead, this avoids having to rebuild
2323
# this local dep which is fairly stable.
2424
BASE_DOCKER_IMAGE="envoyproxy/envoy:dev"
25-
declare -r DOCKER_BUILD_FILE="ci/Dockerfile-envoy"
25+
declare -r DOCKER_BUILD_FILE="distribution/docker/Dockerfile-envoy"
2626

2727
DOCKER_CONTEXT=.
2828
DOCKER_BUILD_ARGS=(

ci/test_docker_ci.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ _test () {
6464

6565
if [[ "$DOCKER_CI_TEST_COMMIT" ]]; then
6666
echo "COMMIT(${name}): > ${testdata}"
67-
echo " ENVOY_VERSION=${version} ENVOY_DOCKER_IMAGE_DIRECTORY=/non/existent/test/path CI_BRANCH=${branch} DOCKER_CI_DRYRUN=1 ./ci/docker_ci.sh | grep -E \"^>\""
68-
./ci/docker_ci.sh | grep -E "^>" > "$testdata"
67+
echo " ENVOY_VERSION=${version} ENVOY_DOCKER_IMAGE_DIRECTORY=/non/existent/test/path CI_BRANCH=${branch} DOCKER_CI_DRYRUN=1 ./distribution/docker/docker_ci.sh | grep -E \"^>\""
68+
./distribution/docker/docker_ci.sh | grep -E "^>" > "$testdata"
6969
return
7070
fi
7171

7272
echo "TEST(${name}): <> ${testdata}"
73-
echo " ENVOY_VERSION=${version} ENVOY_DOCKER_IMAGE_DIRECTORY=/non/existent/test/path CI_BRANCH=${branch} DOCKER_CI_DRYRUN=1 ./ci/docker_ci.sh | grep -E \"^>\""
73+
echo " ENVOY_VERSION=${version} ENVOY_DOCKER_IMAGE_DIRECTORY=/non/existent/test/path CI_BRANCH=${branch} DOCKER_CI_DRYRUN=1 ./distribution/docker/docker_ci.sh | grep -E \"^>\""
7474
generated="$(mktemp)"
7575

76-
./ci/docker_ci.sh | grep -E "^>" > "$generated"
76+
./distribution/docker/docker_ci.sh | grep -E "^>" > "$generated"
7777

7878
cmp --silent "$testdata" "$generated" || {
7979
echo "files are different" >&2

distribution/docker/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
licenses(["notice"]) # Apache 2
2+
3+
exports_files([
4+
"Dockerfile-envoy",
5+
"docker-entrypoint.sh",
6+
"docker_ci.sh",
7+
])

ci/Dockerfile-envoy renamed to distribution/docker/Dockerfile-envoy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG ENVOY_VRP_BASE_IMAGE=envoy-base
55

66

77
FROM scratch AS binary
8-
COPY ci/docker-entrypoint.sh /
8+
COPY distribution/docker/docker-entrypoint.sh /
99
ADD configs/envoyproxy_io_proxy.yaml /etc/envoy/envoy.yaml
1010
# See https://github.com/docker/buildx/issues/510 for why this _must_ be this way
1111
ARG TARGETPLATFORM

distribution/docker/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Envoy Docker Distribution
2+
3+
This directory contains the Docker build configuration for Envoy container images.
4+
5+
## Files
6+
7+
- `Dockerfile-envoy` - Main Dockerfile for building Envoy container images
8+
- `docker_ci.sh` - Script for building and pushing Docker images in CI
9+
- `docker-entrypoint.sh` - Entrypoint script for Envoy containers
10+
11+
## Usage
12+
13+
The Docker build is typically invoked through the main CI script:
14+
15+
```bash
16+
./ci/do_ci.sh docker
17+
```
18+
19+
This will build Docker images for multiple platforms and variants including:
20+
- Standard Envoy image
21+
- Debug image
22+
- Contrib image (with additional extensions)
23+
- Distroless image
24+
- Google VRP image
25+
- Tools image
26+
27+
## Development
28+
29+
For local development, you can build images directly using the docker_ci.sh script:
30+
31+
```bash
32+
DOCKER_CI_DRYRUN=1 ./distribution/docker/docker_ci.sh
33+
```
34+
35+
This will show what commands would be executed without actually building images.
File renamed without changes.

ci/docker_ci.sh renamed to distribution/docker/docker_ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ build_args() {
147147

148148
target="${build_type/-debug/}"
149149
target="${target/-contrib/}"
150-
printf ' -f ci/Dockerfile-envoy --target %s' "envoy${target}"
150+
printf ' -f distribution/docker/Dockerfile-envoy --target %s' "envoy${target}"
151151

152152
if [[ "${build_type}" == *-contrib* ]]; then
153153
printf ' --build-arg ENVOY_BINARY=envoy-contrib'

0 commit comments

Comments
 (0)