pidgin/nest

Optimises Dockerfile

2019-01-28, Jason
7a03059a6733
Parents 36361c968236
Children 2e12c8034c19
Optimises Dockerfile
  • +11 -0
    .dockerignore
  • +10 -7
    Dockerfile
  • --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/.dockerignore Mon Jan 28 20:36:52 2019 +0000
    @@ -0,0 +1,11 @@
    +.dockerignore
    +.hg
    +.hgignore
    +.idea
    +.npmrc
    +.vscode
    +Dockerfile
    +community.md
    +convey.yml
    +node_modules
    +readme.md
    --- a/Dockerfile Sun Feb 03 21:09:43 2019 -0500
    +++ b/Dockerfile Mon Jan 28 20:36:52 2019 +0000
    @@ -7,17 +7,20 @@
    apt-get clean && \
    rm -rf /var/lib/apt/lists
    -COPY . /hugo
    +COPY package-lock.json package.json /nest/
    RUN set -ex && \
    - cd /hugo && \
    - hugo -s hugo -d ../public && \
    - npm ci --production && \
    - npm run tidy
    + cd /nest && \
    + npm ci --production && \
    + npm cache clean --force
    +
    +COPY . /nest
    +
    +RUN hugo -s /nest/hugo -d /nest/public && \
    + node /nest/tools/pre-prod.js
    FROM rwgrim/goserve
    -COPY --from=build /hugo/public /html
    +COPY --from=build /nest/public /html
    EXPOSE 3000/tcp
    -