Dockerfile 794 Bytes
Newer Older
BoHong Li's avatar
BoHong Li committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM hackmdio/buildpack:1.0.4 as BUILD

COPY --chown=hackmd:hackmd . .

RUN set -xe && \
    git reset --hard && \
    git clean -fx && \
    yarn install && \
    yarn build && \
    yarn install --production=true && \
    cp ./deployments/docker-entrypoint.sh ./ && \
    cp .sequelizerc.example .sequelizerc && \
    rm -rf .git .gitignore .travis.yml .dockerignore .editorconfig .babelrc .mailmap .sequelizerc.example \
        test docs contribute \
        yarn.lock webpack.prod.js webpack.htmlexport.js webpack.dev.js webpack.common.js \
        config.json.example README.md CONTRIBUTING.md AUTHORS

18
FROM hackmdio/runtime:1.0.6
BoHong Li's avatar
BoHong Li committed
19
20
USER hackmd
WORKDIR /home/hackmd/app
21
COPY --chown=1500:1500 --from=BUILD /home/hackmd/app .
22
EXPOSE 3000
BoHong Li's avatar
BoHong Li committed
23
ENTRYPOINT ["/home/hackmd/app/docker-entrypoint.sh"]