2020-02-09 14:30:03 +00:00
|
|
|
FROM hashicorp/packer:1.5.1
|
|
|
|
|
2020-02-11 12:49:01 +00:00
|
|
|
ARG PROXY=""
|
|
|
|
ENV http_proxy="${PROXY}"
|
|
|
|
ENV https_proxy="${PROXY}"
|
|
|
|
|
2020-02-10 07:40:08 +00:00
|
|
|
ARG USER=packer
|
|
|
|
ARG GROUP=packer
|
|
|
|
|
|
|
|
WORKDIR /packer
|
|
|
|
|
|
|
|
RUN apk add --update qemu qemu-system-x86_64 qemu-img \
|
|
|
|
vim htop util-linux gzip sysfsutils openssh-client openssh-keygen sudo
|
|
|
|
|
|
|
|
RUN addgroup -g 1000 "${GROUP}" && \
|
|
|
|
adduser -u 1000 -D -G "${GROUP}" "${USER}" && \
|
|
|
|
echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER && \
|
|
|
|
chmod 0440 /etc/sudoers.d/$USER
|
|
|
|
|
|
|
|
USER "${USER}"
|
2020-02-09 14:30:03 +00:00
|
|
|
|
|
|
|
ENV PACKER_LOG=1
|
2020-02-10 07:40:08 +00:00
|
|
|
ENV PS1="[\u@\h \W]# "
|
2020-02-09 14:30:03 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/packer"]
|
|
|
|
|
|
|
|
|