Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #99 from kids-first/fix/dockerfile_error
Browse files Browse the repository at this point in the history
fix dockerfile
  • Loading branch information
adipaul1981 authored Apr 28, 2022
2 parents 7c86332 + f10f56f commit 5503c81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ RUN mkdir -p /opt/app

WORKDIR /opt/app

RUN apk add --update --no-cache git
RUN apk add --update --no-cache

COPY . .

RUN npm install && npm clean && npm build
RUN npm install && npm run clean && npm run build

FROM node:16.13-alpine AS image-run
WORKDIR /opt/app
COPY --from=image-build ./opt/app/dist ./dist
COPY --from=build-image ./opt/app/dist ./dist
COPY package* ./

RUN NODE_ENV=production npm install --production --ignore-optional && \
npm autoclean --init && \
npm autoclean --force && \
npm cache clean
npm prune

EXPOSE 3232

Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ a kids-first instantiation of the persona microservice: https://github.com/kids-
- Create a local `.env` file based on the provided schema in `.env.schema`

```
npm --ignore-optional && \
npm build && \
npm autoclean --init && \
npm autoclean --force && \
npm cache clean && npm start
npm run build && \
npm prune && npm start
```

0 comments on commit 5503c81

Please sign in to comment.