Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Docker with Podman #39

Merged
merged 9 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on:
push:
branches: [main]
paths:
- '**Dockerfile'
- '**.dockerfile'
- '**Containerfile'
- '**.containerfile'
- '.github/workflows/hadolint.yml'
pull_request:
paths:
- '**Dockerfile'
- '**.dockerfile'
- '**Containerfile'
- '**.containerfile'
- '.github/workflows/hadolint.yml'

jobs:
Expand All @@ -21,4 +21,4 @@ jobs:
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
with:
recursive: 'true'
dockerfile: Dockerfile
dockerfile: Containerfile
7 changes: 3 additions & 4 deletions Dockerfile → Containerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# syntax=docker/dockerfile:1
FROM ubuntu:22.04

# If you faced any error from dprint: https://github.com/dprint/dprint-plugin-dockerfile/issues

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint global ignore=DL4006
# Because of SHELL is not supported in OCI format
# SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Available versions in apt: https://packages.ubuntu.com/jammy/curl
# --no-install-recommends is recommended by hadolint, but it omits ca-certificates
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Docker container image - Nix package manager on Ubuntu
# Containerfile - Nix package manager on Ubuntu

## Usage

```bash
git clone [email protected]:kachick/dockerfile-ubuntu-nix.git
cd dockerfile-ubuntu-nix
docker build -t dockerfile-ubuntu-nix - < Dockerfile
docker run -it dockerfile-ubuntu-nix
git clone [email protected]:kachick/container-ubuntu-nix.git
cd container-ubuntu-nix
podman build --tag container-ubuntu-nix --file Containerfile .
podman run -it container-ubuntu-nix
```

```console
root@b130fdb85b72:/# nix --version
nix (Nix) 2.19.3
root@b130fdb85b72:/# nix run nixpkgs#hello
root@a1cdfec2dca5:/# nix --version
nix (Nix) 2.20.3
root@a1cdfec2dca5:/# nix run nixpkgs#hello
Hello, world!
```

Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tasks:
- dprint check
- typos . .github .vscode
- nixpkgs-fmt --check ./*.nix
- hadolint Dockerfile
- hadolint Containerfile
deps:
cmds:
- nix --version
Expand Down
3 changes: 0 additions & 3 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"json": {},
"markdown": {},
"dockerfile": {
},
"prettier": {
"printWidth": 120,
"singleQuote": true
},
"plugins": [
"https://plugins.dprint.dev/json-0.19.1.wasm",
"https://plugins.dprint.dev/markdown-0.16.3.wasm",
"https://plugins.dprint.dev/dockerfile-0.3.0.wasm",
"https://plugins.dprint.dev/prettier-0.38.1.json@ae9b60b1ca7e22223cb47325b3d42c681444b46863d28ed92edc426f8a177e58"
]
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
nixpkgs-fmt
go-task
hadolint # Why prefer stable: https://github.com/NixOS/nixpkgs/pull/240387#issuecomment-1686601267
buildah
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used for now, but added for trying to use


unstable-pkgs.dprint
unstable-pkgs.typos
Expand Down