diff --git a/.gitea/workflows/base.yaml b/.gitea/workflows/base.yaml new file mode 100644 index 0000000..5aec33b --- /dev/null +++ b/.gitea/workflows/base.yaml @@ -0,0 +1,45 @@ +name: Build base containers +on: + push: + branches: ["main"] + paths: + - "base.Containerfile" + - "web-base.Containerfile" + - "config/" + - "scripts/build-host-spawn.sh" + - ".gitea/workflows/base.yaml" + +jobs: + fedora-build: + runs-on: job-latest + steps: + - name: Clone repo + uses: actions/checkout@v4 + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Registry + uses: docker/login-action@v3 + with: + registry: git.plabble.org + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and push Base container + uses: docker/build-push-action@v5 + with: + context: . + file: ./base.Containerfile + push: true + tags: git.plabble.org/Maurice/devc-base:${{ github.ref_name }} + build-args: TAG=${{ github.ref_name }} + outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true + + - name: Build and push Web Base container + uses: docker/build-push-action@v5 + with: + context: . + file: ./web-base.Containerfile + push: true + tags: git.plabble.org/Maurice/devc-web-base:${{ github.ref_name }} + build-args: TAG=${{ github.ref_name }} + outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true diff --git a/base.Containerfile b/base.Containerfile index a598c58..eaa9782 100644 --- a/base.Containerfile +++ b/base.Containerfile @@ -2,7 +2,7 @@ FROM alpine:latest RUN apk update && apk add --no-cache \ git openssh helix bash bash-completion go curl \ - helix-tree-sitter-vendor + helix-tree-sitter-vendor podman-compose # tree-sitter-yaml, tree-sitter-caddy diff --git a/config/.bashrc b/config/.bashrc index c06c7f7..7b932be 100644 --- a/config/.bashrc +++ b/config/.bashrc @@ -1,2 +1,2 @@ export COLORTERM=truecolor -export EDITOR=hx \ No newline at end of file +export EDITOR=hx diff --git a/enter.sh b/enter.sh index 6eafeda..81de7f1 100755 --- a/enter.sh +++ b/enter.sh @@ -18,11 +18,13 @@ if [ "$(podman container inspect "$name" -f {{.State.Running}} 2>&1)" != 'true' --security-opt label=disable \ --userns=keep-id \ --name $name \ + --network host \ -e HOST_HOME=$HOME \ -e SSH_AUTH_SOCK='/tmp/ssh.sock' \ -v /run/user/$UID/bus:/tmp/dbus.sock \ -v /run/user/$UID/keyring/ssh:/tmp/ssh.sock \ - -v $HOME/Dev:/home/user/dev \ + -v /run/user/$UID/podman/podman.sock:/tmp/podman.sock \ + -v $HOME/dev:/home/user/dev \ -v v-$name:/home/user:copy \ --rm -td $name fi diff --git a/fullstack.Containerfile b/fullstack.Containerfile index 2c41003..b96cc09 100644 --- a/fullstack.Containerfile +++ b/fullstack.Containerfile @@ -6,4 +6,5 @@ RUN apk add --no-cache \ COPY scripts/install-roslyn.sh /tmp/install-roslyn.sh RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh -USER user \ No newline at end of file +USER user +RUN dotnet tool install --global dotnet-ef \ No newline at end of file