Skip to content

Commit 209cd29

Browse files
committed
feat: change base image to node 10.20.1
Signed-off-by: Raccoon <[email protected]>
1 parent 9c479dd commit 209cd29

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

deployments/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM hackmdio/buildpack:1.0.4 as BUILD
1+
FROM hackmdio/buildpack:node-10-0baafb79 as BUILD
22

33
COPY --chown=hackmd:hackmd . .
44

@@ -12,11 +12,14 @@ RUN set -xe && \
1212
rm -rf .git .gitignore .travis.yml .dockerignore .editorconfig .babelrc .mailmap .sequelizerc.example \
1313
test docs contribute \
1414
package-lock.json webpack.prod.js webpack.htmlexport.js webpack.dev.js webpack.common.js \
15-
config.json.example README.md CONTRIBUTING.md AUTHORS
15+
config.json.example README.md CONTRIBUTING.md AUTHORS node_modules
1616

17-
FROM hackmdio/runtime:1.0.6
17+
ARG RUNTIME=hackmdio/runtime:node-10-0baafb79
18+
19+
FROM hackmdio/runtime:node-10-0baafb79
1820
USER hackmd
1921
WORKDIR /home/hackmd/app
2022
COPY --chown=1500:1500 --from=BUILD /home/hackmd/app .
23+
RUN npm install --production && npm cache clean --force && rm -rf /tmp/{core-js-banners,phantomjs}
2124
EXPOSE 3000
2225
ENTRYPOINT ["/home/hackmd/app/docker-entrypoint.sh"]

deployments/build.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,12 @@
22

33
CURRENT_DIR=$(dirname "$BASH_SOURCE")
44

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

0 commit comments

Comments
 (0)