Skip to content

Commit

Permalink
add docker-in-docker?
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed Nov 25, 2024
1 parent 32490c1 commit 2d5f6d4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@
// Allow the container to access the host X11 display and EPICS CA
"--net=host",
// Make sure SELinux does not disable with access to host filesystems like tmp
"--security-opt=label=disable"
"--security-opt=label=disable",
// add the docker socket environment variable to the container
"-e=DOCKER_HOST=${localEnv:DOCKER_HOST}"
],
// Mount the parent as /workspaces so we can pip install peers as editable
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
// for rootless we must not to mess with user ids inside the container
"updateRemoteUserUID": false,
// for rootless we are root inside the container
"remoteUser": "root"
}
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# Stage 1: Development stage
FROM eclipse-temurin:17-jdk AS developer

ENV DOCKER=docker-27.3.1

# Install Maven and Git for development purposes
RUN apt-get update && \
apt-get install -y maven git && \
apt-get clean


# install the docker ce cli binary
RUN curl -O https://download.docker.com/linux/static/stable/x86_64/${DOCKER}.tgz && \
tar xvf ${DOCKER}.tgz && \
cp docker/docker /usr/bin && \
rm -r ${DOCKER}.tgz docker

# Set the working directory for development
WORKDIR /workspace

Expand Down

0 comments on commit 2d5f6d4

Please sign in to comment.