summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-12-09 23:44:12 +0100
committerChristian Poessinger <christian@poessinger.com>2018-12-18 13:37:35 +0100
commit9473364834deae2574873af9087aa8907f775b93 (patch)
treea51570622c7131b103770149a5b57fe96ecd01a9 /Dockerfile
parentdfbe78ffbaa225b7e11d8e1e0e0b7d65fc9e022a (diff)
downloadvyos-build-9473364834deae2574873af9087aa8907f775b93.tar.gz
vyos-build-9473364834deae2574873af9087aa8907f775b93.zip
Added Jenkinsfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 21 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 17864402..bf639707 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 \
@@ -73,11 +75,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