-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test building a custom devcontainer.
- Loading branch information
1 parent
bfd19f0
commit a7c957d
Showing
3 changed files
with
66 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: build-devbox | ||
|
||
on: | ||
push: | ||
tags: | ||
- "devcontainer-*" | ||
workflow_dispatch: {} | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: "${{ github.repository }}-devcontainer" | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Extract version and branch metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=sha | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile.devcontainer | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,16 @@ | ||
FROM docker.io/eprosima/vulcanexus:humble-desktop | ||
|
||
# Setup packages needed for `make devbox-install` | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install git ansible python3-pip vim sudo | ||
|
||
# Install the latest devbox playbook from git | ||
COPY . /seahawk | ||
RUN make -C /seahawk devbox-install | ||
|
||
# For vulcanexus container... make a user. | ||
RUN useradd -Um -d /home/student -s /usr/bin/bash --uid 1000 -G adm,sudo student \ | ||
&& echo 'student ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/student_nopasswd \ | ||
&& echo '. /opt/vulcanexus/humble/setup.bash' >> /home/student/.bashrc | ||
|
||
USER student |
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