2020-05-17 11:48:17 +00:00
|
|
|
FROM hackmdio/buildpack:node-10-0baafb79 as BUILD
|
2019-08-17 18:37:34 +00:00
|
|
|
|
|
|
|
COPY --chown=hackmd:hackmd . .
|
|
|
|
|
|
|
|
RUN set -xe && \
|
|
|
|
git reset --hard && \
|
|
|
|
git clean -fx && \
|
2020-02-17 03:05:30 +00:00
|
|
|
npm install && \
|
|
|
|
npm run build && \
|
2019-08-17 18:37:34 +00:00
|
|
|
cp ./deployments/docker-entrypoint.sh ./ && \
|
|
|
|
cp .sequelizerc.example .sequelizerc && \
|
|
|
|
rm -rf .git .gitignore .travis.yml .dockerignore .editorconfig .babelrc .mailmap .sequelizerc.example \
|
|
|
|
test docs contribute \
|
2020-02-17 03:05:30 +00:00
|
|
|
package-lock.json webpack.prod.js webpack.htmlexport.js webpack.dev.js webpack.common.js \
|
2020-05-17 11:48:17 +00:00
|
|
|
config.json.example README.md CONTRIBUTING.md AUTHORS node_modules
|
2019-08-17 18:37:34 +00:00
|
|
|
|
2020-05-17 11:48:17 +00:00
|
|
|
ARG RUNTIME=hackmdio/runtime:node-10-0baafb79
|
|
|
|
|
|
|
|
FROM hackmdio/runtime:node-10-0baafb79
|
2019-08-17 18:37:34 +00:00
|
|
|
USER hackmd
|
|
|
|
WORKDIR /home/hackmd/app
|
2019-10-22 16:54:02 +00:00
|
|
|
COPY --chown=1500:1500 --from=BUILD /home/hackmd/app .
|
2020-05-17 11:48:17 +00:00
|
|
|
RUN npm install --production && npm cache clean --force && rm -rf /tmp/{core-js-banners,phantomjs}
|
2019-07-30 10:09:17 +00:00
|
|
|
EXPOSE 3000
|
2019-08-17 18:37:34 +00:00
|
|
|
ENTRYPOINT ["/home/hackmd/app/docker-entrypoint.sh"]
|