diff --git a/Dockerfile b/Dockerfile index 20983b8b..b84a4aa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,16 +62,16 @@ RUN \ go build -o remark42 -ldflags "-X main.revision=${version} -s -w" ./app -FROM node:10.6-alpine as build-frontend-deps +FROM node:10.11-alpine as build-frontend-deps ARG CI RUN apk add --no-cache --update git -ADD web/package.json /srv/web/package.json +ADD web/package.json /srv/web/package.json ADD web/package-lock.json /srv/web/package-lock.json RUN cd /srv/web && CI=true npm ci -FROM node:10.6-alpine as build-frontend +FROM node:10.11-alpine as build-frontend ARG CI ARG SKIP_FRONTEND_TEST @@ -81,7 +81,7 @@ COPY --from=build-frontend-deps /srv/web/node_modules /srv/web/node_modules ADD web /srv/web RUN cd /srv/web && \ if [ -z "$SKIP_FRONTEND_TEST" ] ; then npx run-p lint test build ; \ - else echo "skip frontend tests and lint" ; npm run build ; fi && \ + else echo "skip frontend tests and lint" ; npm run build ; fi && \ rm -rf ./node_modules diff --git a/Dockerfile.artifacts b/Dockerfile.artifacts index ee1254f8..829ccea7 100644 --- a/Dockerfile.artifacts +++ b/Dockerfile.artifacts @@ -1,4 +1,4 @@ -FROM node:10.6-alpine as build-frontend-deps +FROM node:10.11-alpine as build-frontend-deps ARG CI ENV SKIP_FRONTEND_TEST=true @@ -8,7 +8,7 @@ ADD web/package.json /srv/web/package.json ADD web/package-lock.json /srv/web/package-lock.json RUN cd /srv/web && CI=true npm ci -FROM node:10.6-alpine as build-frontend +FROM node:10.11-alpine as build-frontend ARG CI ARG NODE_ENV=production @@ -32,7 +32,7 @@ ADD README.md /go/src/github.com/umputun/remark/ ADD LICENSE /go/src/github.com/umputun/remark/ COPY --from=build-frontend /srv/web/public/ web -RUN \ +RUN \ export WEB_ROOT=/go/src/github.com/umputun/remark/backend/web && \ sed -i "s|https://demo.remark42.com|http://127.0.0.1:8080|g" ${WEB_ROOT}/*.js && \ sed -i "/REMOVE-START/,/REMOVE-END/d" ${WEB_ROOT}/iframe.html && \