From e08a9b406dc76773c559c8a9875b246db3b15876 Mon Sep 17 00:00:00 2001 From: Steve White Date: Sat, 26 Oct 2024 23:14:49 -0500 Subject: [PATCH] fixed Dockerfil, experimenting with caching --- .dockerignore | 3 ++- Dockerfile | 4 +++- boxes-api | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index bb21e49..6c9528d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,6 +13,7 @@ boxes-api/bin # Ignore Git and other version control system files .git .gitignore +.cache # Ignore Docker's own files .dockerignore @@ -23,4 +24,4 @@ Dockerfile.update # Ignore other miscellaneous files README.md LICENSE -test.bash \ No newline at end of file +test.bash diff --git a/Dockerfile b/Dockerfile index 5802bfe..2b94bca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,9 @@ COPY boxes-api/go.sum ./ RUN go mod download COPY boxes-api/. ./ ENV CGO_ENABLED=1 +#ENV GOCACHE=./.cache/go-build +#RUN --mount=type=cache,target="./.cache/go-build" go build -o boxes-api . RUN go build -o boxes-api . COPY --from=fe-builder /app/build /app/build EXPOSE 8080 -CMD ["./boxes-api"] \ No newline at end of file +CMD ["/app/boxes-api"] diff --git a/boxes-api b/boxes-api index 76a03cd..d0eb8f7 160000 --- a/boxes-api +++ b/boxes-api @@ -1 +1 @@ -Subproject commit 76a03cda573f415c7dd1de64823037dc683bf98b +Subproject commit d0eb8f733c25dbb13d09613ec6f393c6299104fd