Merge branch 'simplify-builder' into 'master'
builder: Use packer and ansible from alpine See merge request fablab/labsync!63
This commit is contained in:
commit
e2a76b6be0
2 changed files with 4 additions and 67 deletions
|
|
@ -1,51 +1,18 @@
|
|||
FROM docker
|
||||
|
||||
ARG ANSIBLE_VERSION
|
||||
|
||||
RUN apk add --no-cache \
|
||||
ansible \
|
||||
aws-cli \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
gnupg \
|
||||
libffi \
|
||||
mktorrent \
|
||||
openssh-client \
|
||||
openssl \
|
||||
python3 \
|
||||
rsync \
|
||||
squashfs-tools \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
make \
|
||||
musl-dev \
|
||||
openssl-dev \
|
||||
py3-pip \
|
||||
python3-dev \
|
||||
&& pip3 install --upgrade pip \
|
||||
&& pip3 install ansible=="$ANSIBLE_VERSION" \
|
||||
&& apk del .build-deps
|
||||
|
||||
ARG PACKER_VERSION
|
||||
|
||||
COPY hashicorp.asc /usr/local/share/
|
||||
|
||||
RUN gpg --import /usr/local/share/hashicorp.asc \
|
||||
&& mkdir -p \
|
||||
/usr/local/bin \
|
||||
/tmp/packer \
|
||||
&& (cd /tmp/packer \
|
||||
&& wget --no-verbose \
|
||||
https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip \
|
||||
https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS \
|
||||
https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS.sig \
|
||||
&& gpg --verify \
|
||||
packer_${PACKER_VERSION}_SHA256SUMS.sig \
|
||||
packer_${PACKER_VERSION}_SHA256SUMS \
|
||||
&& sha256sum -c --strict --ignore-missing packer_${PACKER_VERSION}_SHA256SUMS | grep -F "packer_${PACKER_VERSION}_linux_amd64.zip: OK" \
|
||||
&& unzip *.zip -d /usr/local/bin \
|
||||
&& rm -f /tmp/packer.zip \
|
||||
) \
|
||||
&& mkdir /workdir
|
||||
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||
&& apk add --no-cache \
|
||||
packer
|
||||
|
||||
WORKDIR /workdir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue