Skip to content

Commit

Permalink
workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryMaciek committed Aug 15, 2024
1 parent 09d5b8f commit 286fe96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand All @@ -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/
Expand Down Expand Up @@ -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)

0 comments on commit 286fe96

Please sign in to comment.