Skip to content

Commit

Permalink
Merge pull request #48 from kachick/push-systemd
Browse files Browse the repository at this point in the history
Push systemd image into ghcr.io
  • Loading branch information
kachick authored Mar 8, 2024
2 parents 8e4df08 + e7b2f9b commit 1fc1e34
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ jobs:
tags: latest ${{ github.sha }} ${{ steps.get-meta.outputs.started_at }}
containerfiles: |
./images/ubuntu-nix-sudoer/Containerfile
build-args: |
username=user
./images/ubuntu-nix-systemd/Containerfile
oci: true
- name: Push To ghcr.io
id: push-to-ghcr
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Usage is written in README.md in each images directory.

## Container Images

| Name | Build in loccal | Pull from container registry |
| ----------------------------------------------- | --------------------------------------------- | ------------------------------------------------------ |
| [ubuntu-nix-sudoer](images/ubuntu-nix-sudoer) | `task try IMAGE=ubuntu-nix-sudoer USER=user` | `podman pull ghcr.io/kachick/ubuntu-nix-sudoer:latest` |
| [ubuntu-nix-systemd](images/ubuntu-nix-systemd) | `task try IMAGE=ubuntu-nix-systemd USER=user` | |
| Name | Build in loccal | Pull from container registry and login the shell |
| ----------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [ubuntu-nix-sudoer](images/ubuntu-nix-sudoer) | `task try IMAGE=ubuntu-nix-sudoer USER=user` | `podman run -it ghcr.io/kachick/ubuntu-nix-sudoer:latest` |
| [ubuntu-nix-systemd](images/ubuntu-nix-systemd) | `task try IMAGE=ubuntu-nix-systemd USER=user` | `podman run ghcr.io/kachick/ubuntu-nix-systemd:latest && podman exec -it --user=user ghcr.io/kachick/ubuntu-nix-systemd:latest` |
2 changes: 1 addition & 1 deletion images/ubuntu-nix-sudoer/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ARG username
ARG username="user"

RUN useradd --no-log-init --create-home --groups sudo $username

Expand Down
2 changes: 1 addition & 1 deletion images/ubuntu-nix-systemd/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/
--no-start-daemon \
--no-confirm

ARG username
ARG username="user"
RUN useradd --no-log-init --create-home $username

CMD [ "/bin/systemd", "--system" ]

0 comments on commit 1fc1e34

Please sign in to comment.