add PROXY to apk package manager
This commit is contained in:
parent
550bed095c
commit
66c1f4f841
@ -1,3 +1,5 @@
|
|||||||
REGISTRY_URL=docker.registry
|
REGISTRY_URL=docker.registry
|
||||||
IMAGE_NAME=packer-builder
|
IMAGE_NAME=packer-builder
|
||||||
VERSION=1.0.0
|
VERSION=1.0.0
|
||||||
|
PROXY=
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
|||||||
*.iso
|
*.iso
|
||||||
*.tar
|
*.tar
|
||||||
*.bz2
|
*.bz2
|
||||||
|
.env
|
||||||
|
|
||||||
packer/assets/id_rsa_qemu*
|
packer/assets/id_rsa_qemu*
|
||||||
packer/assets/packer_cache/
|
packer/assets/packer_cache/
|
||||||
|
@ -5,6 +5,8 @@ services:
|
|||||||
image: ${REGISTRY_URL}/${IMAGE_NAME}:${VERSION}
|
image: ${REGISTRY_URL}/${IMAGE_NAME}:${VERSION}
|
||||||
build:
|
build:
|
||||||
context: ./packer
|
context: ./packer
|
||||||
|
args:
|
||||||
|
PROXY: "${PROXY}"
|
||||||
entrypoint: "bash -c"
|
entrypoint: "bash -c"
|
||||||
command: "'while sleep 3600; do :; done'"
|
command: "'while sleep 3600; do :; done'"
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
FROM hashicorp/packer:1.5.1
|
FROM hashicorp/packer:1.5.1
|
||||||
|
|
||||||
|
ARG PROXY=""
|
||||||
|
ENV http_proxy="${PROXY}"
|
||||||
|
ENV https_proxy="${PROXY}"
|
||||||
|
|
||||||
ARG USER=packer
|
ARG USER=packer
|
||||||
ARG GROUP=packer
|
ARG GROUP=packer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user