Skip to content

Commit 9e96753

Browse files
authored
Merge pull request #2 from sigdba/develop
Added arch base support
2 parents a904595 + a127fe3 commit 9e96753

3 files changed

Lines changed: 23 additions & 5 deletions

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: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ 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-
# requirements.txt is required
28-
[ -f $SCRIPT_DIR/requirements.txt ] || die "requirements.txt not found. See requirements.txt.example"
29-
27+
# Set defaults
28+
[ -z "$DOCKERDEV_BASE" ] && DOCKERDEV_BASE=python
3029

3130
# Figure out which md5 command to use
3231
if which md5sum >/dev/null; then
@@ -66,12 +65,17 @@ HIST_FILE="$SCRIPT_DIR/.docker-dev-zsh_history"
6665
[[ "$1" == '-b' ]] && BUILD_IMAGE=y
6766
if [ -n "$BUILD_IMAGE" ]; then
6867
cd ${DD_HOME}
69-
ln -sf ../requirements.txt ./requirements.txt
68+
if [ -f $SCRIPT_DIR/requirements.txt ]; then
69+
ln -sf ../requirements.txt ./requirements.txt
70+
else
71+
rm -f ./requirements.txt
72+
touch ./requirements.txt
73+
fi
7074
ln -sf ../site.conf ./site.conf
7175
TARBALL="${SCRIPT_DIR}/.-docker-dev-build-tmp.tar.gz"
7276
rm -f ${TARBALL} || die "Error removing old context tarball"
7377
tar czhf ${TARBALL} . || die "Error creating context tarball"
74-
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"
7579
fi
7680

7781
touch "$HIST_FILE"

0 commit comments

Comments
 (0)