add PROXY to apk package manager

This commit is contained in:
Antoine Roux 2020-02-11 13:49:01 +01:00
parent 550bed095c
commit 66c1f4f841
4 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,5 @@
REGISTRY_URL=docker.registry
IMAGE_NAME=packer-builder
VERSION=1.0.0
PROXY=

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
*.iso
*.tar
*.bz2
.env
packer/assets/id_rsa_qemu*
packer/assets/packer_cache/

View File

@ -5,6 +5,8 @@ services:
image: ${REGISTRY_URL}/${IMAGE_NAME}:${VERSION}
build:
context: ./packer
args:
PROXY: "${PROXY}"
entrypoint: "bash -c"
command: "'while sleep 3600; do :; done'"
stdin_open: true

View File

@ -1,5 +1,9 @@
FROM hashicorp/packer:1.5.1
ARG PROXY=""
ENV http_proxy="${PROXY}"
ENV https_proxy="${PROXY}"
ARG USER=packer
ARG GROUP=packer