Move gcc installation before backend files addition

This allows to not reinstall apk files when backend files change and the
new image is built.
This commit is contained in:
Dmitry Verkhoturov
2024-09-19 19:05:01 -05:00
committed by Umputun
parent 6cd5c45a6c
commit cbf9a82a92
+3 -3
View File
@@ -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