commit 3f0d6fd6c51d7dca66cf17a68a12bb8208d6650a Author: Adam Štrauch Date: Mon Apr 21 02:48:26 2025 +0200 Initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..30ab55d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM registry.fedoraproject.org/fedora-toolbox:42 + +# Basic packages +RUN dnf check-update +RUN dnf install -y duf fd-find fish fzf htop ncdu tmux vim zstd ipcalc sdcv tldr jq genius pwgen httpie ripgrep lsd + +# Dev stuff +RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc +RUN echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\nautorefresh=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | tee /etc/yum.repos.d/vscode.repo +RUN dnf check-update +RUN dnf install -y golang nodejs python3-devel mycli pgcli git-lfs awscli openssh-askpass make code + +# User +RUN groupadd cx -g 1000 +RUN useradd cx -u 1000 -g cx -d /var/home/cx -s /usr/bin/fish + +# Podman +ADD uni.sh /usr/bin/podman +ADD podman-compose.sh /usr/bin/podman-compose +ADD uni.sh /usr/bin/docker + +# Incus +ADD uni.sh /usr/bin/incus diff --git a/README.md b/README.md new file mode 100644 index 0000000..ba331da --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# My devcontainer + +Container for distrobox that I use for development based on Fedora. + +## Usage + +Including systemd: + +``` +distrobox create -i gitea.ceperka.net/cx/devcontainer:f42-latest -n drone --hostname drone --init +``` + +No systemd: + +``` +distrobox create -i gitea.ceperka.net/cx/devcontainer:f42-latest -n drone --hostname drone +``` diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..0b78854 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,15 @@ +# https://taskfile.dev + +version: '3' + +vars: + IMAGE: gitea.ceperka.net/cx/devcontainer:f42-latest + +tasks: + build: + cmds: + - docker pull registry.fedoraproject.org/fedora-toolbox + - docker build -t {{ .IMAGE }} . + push: + cmds: + - docker push {{ .IMAGE }} diff --git a/podman-compose.sh b/podman-compose.sh new file mode 100755 index 0000000..429cfb5 --- /dev/null +++ b/podman-compose.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +distrobox-host-exec podman compose $* diff --git a/uni.sh b/uni.sh new file mode 100755 index 0000000..2e5da0e --- /dev/null +++ b/uni.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +distrobox-host-exec $(basename "$0") $*