From cbb59010bd540399e6872d0af241f7a0b8da7f0f Mon Sep 17 00:00:00 2001 From: nfel Date: Tue, 28 Jul 2026 14:47:25 +0330 Subject: [PATCH] fixed docker file placement --- .gitea/actions/docker-build-push/action.yml | 2 +- Makefile | 5 ++++- README.md | 2 +- Dockerfile => build/dockerfile | 0 4 files changed, 6 insertions(+), 3 deletions(-) rename Dockerfile => build/dockerfile (100%) diff --git a/.gitea/actions/docker-build-push/action.yml b/.gitea/actions/docker-build-push/action.yml index 53e0544..6d10820 100644 --- a/.gitea/actions/docker-build-push/action.yml +++ b/.gitea/actions/docker-build-push/action.yml @@ -34,7 +34,7 @@ runs: fi docker buildx build \ - -f Dockerfile \ + -f build/dockerfile \ --build-arg "GO_PROXY=$go_proxy" \ --label "org.opencontainers.image.revision=$COMMIT_SHA" \ --label "org.opencontainers.image.source=${GITHUB_SERVER_URL:-}" \ diff --git a/Makefile b/Makefile index c197d49..785a0df 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: run test build +.PHONY: run test build docker-build run: go run ./cmd/server @@ -8,3 +8,6 @@ test: build: go build -o teammate ./cmd/server + +docker-build: + docker build -f build/dockerfile -t hamkar:local . diff --git a/README.md b/README.md index 0b6a9f1..0ede122 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Place a TLS reverse proxy such as Caddy or nginx in front of the binary. Back up The multi-stage image runs tests during the build, compiles a static Go binary, uses a non-root runtime user, persists SQLite under `/data`, and exposes a `/healthz` container health check. ```bash -docker build -t hamkar:local . +docker build -f build/dockerfile -t hamkar:local . docker run --rm -p 8080:8080 \ -e SESSION_SECURE=false \ -e INITIAL_ADMIN_PASSWORD='replace-this-password' \ diff --git a/Dockerfile b/build/dockerfile similarity index 100% rename from Dockerfile rename to build/dockerfile