diff --git a/Dockerfile b/Dockerfile index a7f1167..147c633 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,8 +33,8 @@ RUN /bin/bash -c "curl -L ${MAMBAURL} > mambaforge.sh \ EXPOSE 8888 ##### PREPARE WORKING DIRECTORY ##### -VOLUME /workdir -WORKDIR /workdir +VOLUME /workspace +WORKDIR /workspace ##### SETUP ENTRYPOINT W/ NONROOT USER ##### COPY entrypoint.sh /bin/entrypoint.sh diff --git a/README.md b/README.md index 02d0c81..4764e3e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # Angry Runner (😠🏃‍♂️) -Delicious recipe for a Docker image suitable for: (1) self-hosted GitHub Actions runners, (2) local development environment as well as (3) GitHub codespaces base for devcontainer mechanism. +Delicious recipe for a Docker image suitable for: (1) self-hosted GitHub Actions runners, (2) local development environment as well as (3) GitHub codespaces base for the devcontainer mechanism. Enjoy! @@ -14,7 +14,7 @@ _~AngryMaciek_ ### Brief description -The base image here is the popular `ubuntu:22:04` - that is to increase the similarity of the container system to users OSs; A few system tools come pre-installed: [GNU Bash](https://www.gnu.org/software/bash/), [gcc & g++](https://gcc.gnu.org/), [Git](https://git-scm.com/), [GNU Make](https://www.gnu.org/software/make/), [CMake](https://cmake.org/), [Vim](https://www.vim.org/) and most importantly - [mambaforge](https://github.com/conda-forge/miniforge), which has been set up for the (default) root user; port `8888` is exposed to the host machine; dir `/workdir` is available to mount a volume; an entrypoint script has been designed to add a new non-root linux user which can access conda via a system's group; executing commands as `angryuser` is available through [gosu](https://github.com/tianon/gosu). +The base image here is the popular `ubuntu:22:04` - that is to increase the similarity of the container system to users OSs; A few system tools come pre-installed: [GNU Bash](https://www.gnu.org/software/bash/), [gcc & g++](https://gcc.gnu.org/), [Git](https://git-scm.com/), [GNU Make](https://www.gnu.org/software/make/), [CMake](https://cmake.org/), [Vim](https://www.vim.org/) and most importantly - [mambaforge](https://github.com/conda-forge/miniforge), which has been set up for the (default) root user; port `8888` is exposed to the host machine; dir `/workspace` is available to mount a volume; an entrypoint script has been designed to add a new non-root linux user which can access conda via a system's group; executing commands as `angryuser` is available through [gosu](https://github.com/tianon/gosu). Useful references: * https://denibertovic.com/posts/handling-permissions-with-docker-volumes/ @@ -70,8 +70,10 @@ docker pull angrymaciek/angry-runner:latest Run the container with: ```bash -docker run --name angry-runner -e HOSTUID=`id -u $USER` -p 8888:8888 -it -v $HOME:/workdir angrymaciek/angry-runner:latest +docker run --name angry-runner -e HOSTUID=`id -u $USER` -p 8888:8888 -it -v $HOME:/workspace angrymaciek/angry-runner:latest ``` In the example above my whole home directory is mounted as the volume. This may, of course, be adjusted. + +### Codespaces (devcontainer)