|
|
@ -18,14 +18,12 @@ RUN go build -ldflags="-s -w" -o app main.go
|
|
|
|
FROM --platform=amd64 alpine:${ALPINE_VERSION} AS stackedit
|
|
|
|
FROM --platform=amd64 alpine:${ALPINE_VERSION} AS stackedit
|
|
|
|
ARG STACKEDIT_VERSION
|
|
|
|
ARG STACKEDIT_VERSION
|
|
|
|
WORKDIR /stackedit
|
|
|
|
WORKDIR /stackedit
|
|
|
|
RUN apk add -q --progress --update --no-cache git npm python2
|
|
|
|
RUN apk add -q --progress --update --no-cache git npm
|
|
|
|
RUN wget -q https://github.com/benweet/stackedit/archive/${STACKEDIT_VERSION}.tar.gz -O stackedit.tar.gz && \
|
|
|
|
RUN git clone --branch ${STACKEDIT_VERSION} --single-branch --depth 1 https://github.com/benweet/stackedit.git . &> /dev/null
|
|
|
|
tar -xzf stackedit.tar.gz --strip-components=1 && \
|
|
|
|
RUN npm install --only=prod
|
|
|
|
rm stackedit.tar.gz
|
|
|
|
|
|
|
|
RUN npm install
|
|
|
|
|
|
|
|
RUN npm audit fix
|
|
|
|
RUN npm audit fix
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
RUN sed -i "s/assetsPublicPath: '\/',/assetsPublicPath: '.\/',/g" config/index.js && cat config/index.js
|
|
|
|
RUN sed -i "s/assetsPublicPath: '\/',/assetsPublicPath: '.\/',/g" config/index.js
|
|
|
|
RUN npm run build
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
|
|
|
|
FROM scratch AS final
|
|
|
|
FROM scratch AS final
|
|
|
|