summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 21 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 988bcc36..b8ec8149 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,6 +9,8 @@ RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' | tee -a /etc/
vim \
git \
make \
+ sudo \
+ locales \
live-build \
pbuilder \
devscripts \
@@ -122,11 +124,24 @@ RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sourc
apt-get update &&\
rm -rf /var/lib/apt/lists/*
-#install packer
+# Standard shell should be bash not dash
+RUN echo "dash dash/sh boolean false" | debconf-set-selections && \
+ DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
+
+RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
+ENV LANG en_US.utf8
+
+# Install packer
RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \
- jq -r -M '.current_version')"; \
- echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_amd64.zip" |\
- curl -K- | gzip -d > /usr/bin/packer
-RUN chmod +x /usr/bin/packer
+ jq -r -M '.current_version')"; \
+ echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_amd64.zip" |\
+ curl -K- | gzip -d > /usr/bin/packer && \
+ chmod +x /usr/bin/packer
+
+# Create vyos_bld user account and enable sudo
+RUN useradd -ms /bin/bash -u 1006 --gid users vyos_bld && \
+ usermod -aG sudo vyos_bld && \
+ echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
-WORKDIR ~
+USER vyos_bld
+WORKDIR /home/vyos_bld