From 3e0defc7b5d7a5498aec6851ae00b026c7fa6817 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 22 Apr 2024 15:30:07 +0100 Subject: Further changes to Dockerfile --- Dockerfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index f2e71d6..71171cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,18 @@ USER root COPY go.mod ./ RUN go mod download && go mod verify -COPY . . +# instead of doing COPY . . here, I want to be specific about the files I want to copy +# this way if I add a new file to the project, it will not be copied over + +# Can this be refactored? +COPY ./cmd ./cmd +COPY ./internal ./internal +COPY ./postgresql ./postgresql +COPY ./ui ./ui +COPY go.sum . +COPY go.mod . +COPY sonar-project.properties . + RUN chown -R app:app /app # Create a directory for the binary -- cgit v1.2.3