Skip to content
Snippets Groups Projects
Commit f6bcc368 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Download packer in Dockerfile

parent 423612f3
No related branches found
No related tags found
No related merge requests found
......@@ -50,10 +50,6 @@ build_docker_image:
- export BUILD_DATE=$(TZ=America/Chicago date +%Y%m%d)
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- |
wget https://releases.hashicorp.com/packer/$PACKER_VER/packer_${PACKER_VER}_linux_amd64.zip -O packer.zip
unzip packer.zip
rm packer.zip
- docker build -t $CI_REGISTRY_IMAGE:$BUILD_DATE -t $CI_REGISTRY_IMAGE:latest .
- >
docker run --rm $CI_REGISTRY_IMAGE bash -c
......
......@@ -5,7 +5,6 @@ ENV ANSIBLE_VER=4.10.0
ENV OSC_VER=5.8.0
ENV TF_VER=1.4.6
ADD ./packer /usr/local/bin
RUN apt-get update && apt-get install --no-install-recommends -y \
git \
ssh \
......@@ -13,6 +12,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://releases.hashicorp.com/packer/${PACKER_VER}/packer_${PACKER_VER}_linux_amd64.zip \
&& unzip packer_${PACKER_VER}_linux_amd64.zip -d /usr/local/bin \
&& rm packer_${PACKER_VER}_linux_amd64.zip
RUN wget https://releases.hashicorp.com/terraform/${TF_VER}/terraform_${TF_VER}_linux_amd64.zip \
&& unzip terraform_${TF_VER}_linux_amd64.zip -d /usr/local/bin \
&& rm terraform_${TF_VER}_linux_amd64.zip
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment