Skip to content

Commit

Permalink
Fix dosemu2 (#1101)
Browse files Browse the repository at this point in the history
* Fix dosemu2

* mount /dev/shm with exec
  • Loading branch information
mkst authored Feb 22, 2024
1 parent 71004bb commit 7e479ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ jobs:
version: 1.0
- name: Install DOSEMU
run: |-
sudo add-apt-repository -y ppa:stsp-0/dj64
sudo add-apt-repository -y ppa:dosemu2/ppa
sudo apt-get update
sudo apt-get install -y dosemu2
sudo apt-get install -y dj64 dosemu2
- name: Install nsjail
run: |-
git clone --recursive --branch=3.1 https://github.com/google/nsjail
Expand Down Expand Up @@ -168,6 +169,7 @@ jobs:
-v $(pwd)/local_files:/local_files \
-v $(pwd)/compilers:/compilers \
-v $(pwd)/libraries:/libraries \
--tmpfs /dev/shm:exec,uid=1000,gid=1000,size=64M,mode=0700 \
--security-opt apparmor=unconfined \
--security-opt seccomp=unconfined \
--entrypoint /bin/bash \
Expand Down
3 changes: 2 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ COPY --from=nsjail /nsjail/nsjail /bin/nsjail
COPY --from=ghcr.io/decompals/wibo:0.6.12 /usr/local/sbin/wibo /usr/bin/

RUN add-apt-repository -y ppa:dosemu2/ppa && \
add-apt-repository -y ppa:stsp-0/dj64 && \
apt-get update && \
apt-get install -y dosemu2
apt-get install -y dosemu2 dj64

# windows compilers need i386 wine

Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ services:
POSTGRES_USER: decompme
POSTGRES_PASSWORD: decompme
ports:
- "5432:5432"
- "5432:5432"
volumes:
- ./postgres:/var/lib/postgresql/data
- ./postgres:/var/lib/postgresql/data
backend:
build:
context: backend
Expand Down Expand Up @@ -45,6 +45,8 @@ services:
volumes:
- ./backend:/backend
tmpfs:
# explicitly mount /dev/shm with exec as dosemu2 requires exec privilege
- /dev/shm:exec,uid=1000,gid=1000,size=64M,mode=0700
# Use a separate tmpfs to prevent a rogue jailed process
# from filling /tmp on the parent container
- /sandbox/tmp:exec,uid=1000,gid=1000,size=64M,mode=0700
Expand Down

0 comments on commit 7e479ea

Please sign in to comment.