feat: change base image to node 10.20.1

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2020-05-17 19:48:17 +08:00
parent 9c479dd574
commit 209cd29b71
2 changed files with 15 additions and 4 deletions

View File

@ -1,4 +1,4 @@
FROM hackmdio/buildpack:1.0.4 as BUILD
FROM hackmdio/buildpack:node-10-0baafb79 as BUILD
COPY --chown=hackmd:hackmd . .
@ -12,11 +12,14 @@ RUN set -xe && \
rm -rf .git .gitignore .travis.yml .dockerignore .editorconfig .babelrc .mailmap .sequelizerc.example \
test docs contribute \
package-lock.json webpack.prod.js webpack.htmlexport.js webpack.dev.js webpack.common.js \
config.json.example README.md CONTRIBUTING.md AUTHORS
config.json.example README.md CONTRIBUTING.md AUTHORS node_modules
FROM hackmdio/runtime:1.0.6
ARG RUNTIME=hackmdio/runtime:node-10-0baafb79
FROM hackmdio/runtime:node-10-0baafb79
USER hackmd
WORKDIR /home/hackmd/app
COPY --chown=1500:1500 --from=BUILD /home/hackmd/app .
RUN npm install --production && npm cache clean --force && rm -rf /tmp/{core-js-banners,phantomjs}
EXPOSE 3000
ENTRYPOINT ["/home/hackmd/app/docker-entrypoint.sh"]

View File

@ -2,4 +2,12 @@
CURRENT_DIR=$(dirname "$BASH_SOURCE")
docker build -t hackmdio/codimd -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."
GIT_SHA1="$(git rev-parse HEAD)"
GIT_SHORT_ID="${SHA1:0:8}"
GIT_TAG=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))
DOCKER_TAG="${GIT_TAG:-$GIT_SHORT_ID}"
docker build -t "hackmdio/codimd:$DOCKER_TAG" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."
docker build --build-arg RUNTIME=node-10-cjk-0baafb79 -t "hackmdio/codimd:$DOCKER_TAG-cjk" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."