Skip to content

Commit dc50042

Browse files
author
js-jslog
committed
Include docker and a way to connect to the docker server on the host
1 parent 218455c commit dc50042

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Dockerfile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN mkdir -p /home/developer/
2121
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
2222

2323
LABEL maintainer="Joseph Sinfield <[email protected]>"
24-
LABEL runcommand="docker run --rm -ti -p 3000:3000 -e http_proxy -e https_proxy -e HTTP_PROXY -e HTTPS_PROXY -e SSH_AUTH_SOCK=\$SSH_AUTH_SOCK -v $(dirname \$SSH_AUTH_SOCK):$(dirname \$SSH_AUTH_SOCK) -v $(pwd):/home/developer/workspace -w /home/developer/workspace jslog/development-env"
24+
LABEL runcommand="docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock-p 3000:3000 -e http_proxy -e https_proxy -e HTTP_PROXY -e HTTPS_PROXY -e SSH_AUTH_SOCK=\$SSH_AUTH_SOCK -v $(dirname \$SSH_AUTH_SOCK):$(dirname \$SSH_AUTH_SOCK) -v $(pwd):/home/developer/workspace -w /home/developer/workspace jslog/development-env"
2525

2626
# Set debconf to run non-interactively
2727
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
@@ -72,6 +72,22 @@ COPY dotfiles/.eslintrc.json /root/.eslintrc.json
7272
COPY dotfiles/jest.config.js /home/developer/jest.config.js
7373
RUN source /root/.bashrc
7474

75+
# Install docker ce so that host docker instances can be manipulated from this env
76+
RUN apt-get update && apt-get install \
77+
apt-transport-https \
78+
ca-certificates \
79+
curl \
80+
gnupg-agent \
81+
software-properties-common
82+
83+
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
84+
RUN add-apt-repository \
85+
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
86+
$(lsb_release -cs) \
87+
stable"
88+
89+
RUN apt-get update && apt-get install docker-ce docker-ce-cli containerd.io
90+
7591
# Copy project templates with local dotfiles
7692
COPY templates/tdd/ /home/developer/templates/tdd/
7793
COPY dotfiles/jest.config.js /home/developer/templates/tdd/.

0 commit comments

Comments
 (0)