From cbf9a82a926f9b2951cb401243e6126f71aa894b Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Fri, 20 Sep 2024 00:03:27 +0100 Subject: [PATCH] Move gcc installation before backend files addition This allows to not reinstall apk files when backend files change and the new image is built. --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 941e7c01..01e0e06f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,15 +54,15 @@ ARG GIT_BRANCH ARG SKIP_BACKEND_TEST ARG BACKEND_TEST_TIMEOUT +# install gcc in order to be able to go test package with -race +RUN apk --no-cache add gcc libc-dev + ADD backend /build/backend # to embed the frontend files statically into Remark42 binary COPY --from=build-frontend /srv/frontend/apps/remark42/public/ /build/backend/app/cmd/web/ RUN find /build/backend/app/cmd/web/ -regex '.*\.\(html\|js\|mjs\)$' -print -exec sed -i "s|{% REMARK_URL %}|http://127.0.0.1:8080|g" {} \; WORKDIR /build/backend -# install gcc in order to be able to go test package with -race -RUN apk --no-cache add gcc libc-dev - RUN echo go version: `go version` # run tests