-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from vncsmyrnk/32-add-custom-docker-image-for-…
…development Adding docker file and workflow to push dev docker image to gh registry
- Loading branch information
Showing
4 changed files
with
55 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Development environment workflow | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: ["Dockerfile"] | ||
|
||
jobs: | ||
publish-image: | ||
needs: ci | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
tags: | | ||
ghcr.io/vncsmyrnk/rust-17.9-slim-dev:latest |
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,15 @@ | ||
FROM ubuntu:22.04 | ||
SHELL ["/bin/bash", "-c"] | ||
RUN <<EOF | ||
apt-get update -qq | ||
apt-get install -qq -y curl wget build-essential sudo | ||
useradd -m -d /home/dev -s /bin/bash -u 1000 dev | ||
adduser dev sudo | ||
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
EOF | ||
USER dev | ||
RUN <<EOF | ||
sh <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y | ||
source $HOME/.cargo/env | ||
EOF | ||
WORKDIR /home/dev |
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
Empty file.