Skip to content

Commit a127fe3

Browse files
committed
Added alternate base image support
1 parent 58a81fb commit a127fe3

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

build/Dockerfile.arch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM archlinux:latest
2+
3+
RUN pacman --noconfirm -Sy git wget curl nmap unzip make zsh openssh filesystem \
4+
&& sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
5+
&& rm -f /etc/profile.d/perlbin.sh
6+
7+
COPY . /build/
8+
RUN mkdir -p /home/user \
9+
&& cp -f /build/docker_zshrc.sh /home/user/.zshrc \
10+
&& cp -f /build/docker_profile.sh /etc/profile.d/docker_dev.sh \
11+
&& cp -f /build/docker_launch.sh /launch.sh
12+
13+
RUN chmod 755 /build/add_features.sh \
14+
&& /build/add_features.sh

docker-dev.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ SCRIPT_DIR="$(cd "$SCRIPT_DIR"; pwd -P)"
2424
[ -f $SCRIPT_DIR/site.conf ] || die "site.conf not found. See site.conf.example"
2525
. $SCRIPT_DIR/site.conf
2626

27+
# Set defaults
28+
[ -z "$DOCKERDEV_BASE" ] && DOCKERDEV_BASE=python
29+
2730
# Figure out which md5 command to use
2831
if which md5sum >/dev/null; then
2932
MD5CMD=md5sum
@@ -72,7 +75,7 @@ if [ -n "$BUILD_IMAGE" ]; then
7275
TARBALL="${SCRIPT_DIR}/.-docker-dev-build-tmp.tar.gz"
7376
rm -f ${TARBALL} || die "Error removing old context tarball"
7477
tar czhf ${TARBALL} . || die "Error creating context tarball"
75-
cat ${TARBALL} | docker build -t "$IMAGE" - || die "docker build failed"
78+
cat ${TARBALL} | docker build -t "$IMAGE" -f Dockerfile.${DOCKERDEV_BASE} - || die "docker build failed"
7679
fi
7780

7881
touch "$HIST_FILE"

0 commit comments

Comments
 (0)