Cleanup docker build of nginx image (#4925)
This commit is contained in:
parent
c86e4e0d9a
commit
26f574dc27
4 changed files with 36 additions and 47 deletions
|
|
@ -38,7 +38,11 @@ if [ ! -f "${ENV_FILE}" ]; then
|
|||
fi
|
||||
|
||||
# build local terraform image to build nginx
|
||||
docker build -t build-nginx-terraform $DIR/images/nginx
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
docker buildx build \
|
||||
--no-cache \
|
||||
--platform linux/amd64 \
|
||||
--tag build-nginx-terraform $DIR/images/nginx
|
||||
|
||||
# build nginx and publish docker images to quay.io.
|
||||
# this can take up to two hours.
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ apt -q=3 install \
|
|||
curl \
|
||||
make \
|
||||
htop \
|
||||
parallel \
|
||||
software-properties-common --yes
|
||||
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
|
|
@ -66,9 +65,6 @@ apt -q=3 install docker-ce --yes
|
|||
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
|
||||
mkdir -p ~/.docker
|
||||
echo '{ "experimental": "enabled", "aliases": { "builder": "buildx" } }' > ~/.docker/config.json
|
||||
|
||||
echo ${docker_password} | docker login -u ${docker_username} --password-stdin quay.io
|
||||
|
||||
curl -sL -o /usr/local/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
|
||||
|
|
@ -82,14 +78,11 @@ cd ingress-nginx/images/nginx
|
|||
|
||||
docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
|
||||
|
||||
docker buildx create --name ingress-nginx
|
||||
docker buildx use ingress-nginx
|
||||
docker buildx install
|
||||
|
||||
docker buildx create --use --name ingress-nginx
|
||||
|
||||
export TAG=$(git rev-parse HEAD)
|
||||
|
||||
echo "Building NGINX image in parallel:"
|
||||
echo "
|
||||
make sub-push-amd64
|
||||
make sub-push-arm
|
||||
make sub-push-arm64
|
||||
" | parallel --joblog /tmp/log {} || cat /tmp/log
|
||||
echo "Building NGINX images..."
|
||||
make release
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue