diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 649b302..1b7332e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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" } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 4d5b292..e52f8df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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