-
-
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
9 changed files
with
122 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
{ | ||
"name": "Debian developer environment", | ||
//"dockerFile": "Dockerfile", | ||
"image": "ghcr.io/gbraad-devenv/debian/base:bookworm", | ||
"context": "..", | ||
"runArgs": [ "--cap-add=NET_ADMIN", "--cap-add=NET_RAW", "--device=/dev/net/tun" ], | ||
"image": "ghcr.io/gbraad-devenv/debian/dotfiles:bookworm", | ||
|
||
"runArgs": [ "--cap-add=NET_ADMIN", "--cap-add=NET_RAW", "--device=/dev/net/tun", "--device=/dev/fuse" ], | ||
"postStartCommand": "github/install.sh", | ||
"extensions": [ | ||
"ms-vscode.Theme-TomorrowKit", | ||
"ritwickdey.LiveServer" | ||
] | ||
} | ||
|
||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.Theme-TomorrowKit", | ||
"ritwickdey.LiveServer", | ||
"ms-toolsai.jupyter", | ||
"ms-python.python" | ||
] | ||
} | ||
} | ||
} |
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,32 @@ | ||
name: build containers | ||
run-name: building containers | ||
on: | ||
schedule: | ||
- cron: "0 0 1 * *" | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
permissions: | ||
contents: read | ||
packages: write | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-24.04 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Run podman build - base | ||
run: podman build -t ghcr.io/gbraad-devenv/debian/base:bookworm -f containers/Containerfile-base . | ||
- name: Run podman build - dotfiles | ||
run: podman build -t ghcr.io/gbraad-devenv/debian/dotfiles:bookworm -f containers/Containerfile-dotfiles . | ||
- name: Run podman build - systemd | ||
run: podman build -t ghcr.io/gbraad-devenv/debian/systemd:bookworm -f containers/Containerfile-systemd . | ||
- name: Push image to ghcr.io - base | ||
run: podman push --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/gbraad-devenv/debian/base:bookworm | ||
- name: Push image to ghcr.io - dotfiles | ||
run: podman push --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/gbraad-devenv/debian/dotfiles:bookworm | ||
- name: Push image to ghcr.io - systemd | ||
run: podman push --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/gbraad-devenv/debian/systemd:bookworm |
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,32 @@ | ||
name: tailscale-ssh | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
code-test: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- name: Remove unwanted stuff | ||
uses: gbraad-devenv/remove-unwanted@v1 | ||
- name: Run system container with `podman` | ||
run: | | ||
podman run -d --name code --hostname code-${HOSTNAME} --systemd=always --cap-add=NET_RAW --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --device=/dev/net/tun --device=/dev/fuse ghcr.io/gbraad-devenv/debian/systemd:bookworm | ||
- name: Tailscale setup (root) | ||
run: | | ||
until podman exec code tailscale up --auth-key ${TAILSCALE_AUTHKEY} --ssh | ||
do | ||
sleep 0.1 | ||
done | ||
podman exec code chmod 640 /etc/shadow | ||
env: | ||
TAILSCALE_AUTHKEY: ${{ secrets.TAILSCALE_AUTHKEY}} | ||
- name: Hang around | ||
run: | | ||
until podman exec code systemctl is-active --quiet tailscaled | ||
do | ||
sleep 1 | ||
done | ||
IP=`podman exec code tailscale ip -4` | ||
echo "Use the following command to connect \`tailscale ssh gbraad@${IP}\`" | ||
sleep infinity |
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,10 @@ | ||
ARG BASE_VERSION="bookworm" | ||
|
||
FROM ghcr.io/gbraad-devenv/debian/base:${BASE_VERSION} | ||
|
||
LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/debian" | ||
|
||
RUN git clone https://github.com/gbraad/dotfiles ~/.dotfiles \ | ||
&& ~/.dotfiles/install.sh | ||
|
||
ENTRYPOINT [ "/bin/zsh" ] |
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,14 @@ | ||
ARG BASE_VERSION="bookworm" | ||
|
||
FROM ghcr.io/gbraad-devenv/debian/dotfiles:${BASE_VERSION} | ||
|
||
LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/debian" | ||
|
||
USER root | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
systemd \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENTRYPOINT ["/sbin/init"] |
6 changes: 5 additions & 1 deletion
6
containers/Dockerfile-toolbox → containers/Containerfile-toolbox
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.