-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
120 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,4 @@ RUN \ | |
|
||
USER root | ||
WORKDIR / | ||
ADD entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["bash", "-l"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
/docker/main_entry.sh | ||
|
||
su builder -c "bash -l -c '\ | ||
cd /workspace && \ | ||
bun install && | ||
bun run codegen && | ||
bun run meson-setup.clang-release && | ||
meson compile -C build/ vs:executable | ||
'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,37 @@ | ||
version: '3.8' | ||
|
||
services: | ||
dev: | ||
image: ghcr.io/KaruroChori/vs-fltk:build-env | ||
image: $IMAGE | ||
container_name: vs-fltk-env | ||
entrypoint: $ENTRYPOINT | ||
volumes: | ||
- ${PWD}:/workspace | ||
- $SOURCE_ROOT:/workspace | ||
- $ENTRYPOINT:$ENTRYPOINT | ||
- ${PWD}/docker/main_entry.sh:/docker/main_entry.sh | ||
environment: | ||
HOSTUID: $HOSTUID | ||
HOSTGID: $HOSTGID | ||
ENTRYPOINT: $ENTRYPOINT | ||
working_dir: /workspace | ||
command: > | ||
bash -l -c " | ||
bun install && | ||
bun run codegen && | ||
bun run meson-setup.clang-release && | ||
meson compile -C build/ vs:executable | ||
" | ||
stdin_open: true # Allows interactive mode | ||
tty: true # Allocate a pseudo-TTY | ||
restart: no | ||
|
||
xgui: | ||
image: $IMAGE | ||
container_name: vs-fltk-gui | ||
entrypoint: $ENTRYPOINT | ||
volumes: | ||
- $SOURCE_ROOT:/workspace | ||
- $ENTRYPOINT:$ENTRYPOINT | ||
- ${PWD}/docker/main_entry.sh:/docker/main_entry.sh | ||
- /tmp/.X11-unix:/tmp/.X11-unix:rw | ||
environment: | ||
HOSTUID: $HOSTUID | ||
HOSTUID: $HOSTGID | ||
HOSTGID: $HOSTGID | ||
ENTRYPOINT: $ENTRYPOINT | ||
DISPLAY: $DISPLAY | ||
QT_X11_NO_MITSHM: 1 | ||
working_dir: /workspace | ||
stdin_open: true # Allows interactive mode | ||
tty: true # Allocate a pseudo-TTY | ||
restart: no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
#!/bin/bash | ||
# main_entry.sh | ||
|
||
set -e | ||
|
||
OLDPWD=$PWD | ||
|
||
if [ -z "HOSTUID" ]; then | ||
if [ -z "$HOSTUID" ]; then | ||
echo "HOSTUID is not set." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "HOSTGID" ]; then | ||
if [ -z "$HOSTGID" ]; then | ||
echo "HOSTGID is not set." | ||
exit 1 | ||
fi | ||
|
||
usermod -u $HOSTUID builder | ||
groupmod -g $HOSTGID builder | ||
chown -R $HOSTUID:$HOSTGID /home/builder | ||
su builder -c "PATH=/home/builder/.local/bin:$PATH && cd $OLDPWD && $1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
/docker/main_entry.sh | ||
|
||
su builder -l -c "cd /workspace && bash" |