diff --git a/.dockerignore b/.dockerignore index 071e88d..0b6761d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,9 +1,4 @@ .idea/** .DS_Store -.dockerignore .env -.gitignore - -Dockerfile -docker-compose.yml diff --git a/Dockerfile b/Dockerfile index 4400367..bddfdcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,16 +4,11 @@ FROM golang:1.22 as builder WORKDIR /app -COPY ./Makefile . -COPY ./go.* . -COPY ./cmd ./cmd -COPY ./server ./server -COPY ./templates ./templates +COPY . . RUN go mod download -# Mount the .git directory to allow the build to get the version from git -RUN --mount=type=bind,source=.git,target=.git make build-linux +RUN make build-linux FROM alpine:latest