Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile changes #166

Merged
merged 1 commit into from
Nov 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
12 changes: 11 additions & 1 deletion Dockerfile.dev → .docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
FROM node:lts-alpine as build-front

RUN apk add --no-cache curl

WORKDIR /app

COPY ./client .

RUN npm install --production \
&& npm run build

FROM node:lts-alpine

WORKDIR /app

RUN mkdir -p ./public

COPY --from=build-front /app/build/ ./public

COPY package*.json ./

RUN npm install

COPY . .
CMD ["npm", "run", "skaffold"]

CMD ["npm", "run", "skaffold"]
9 changes: 5 additions & 4 deletions Dockerfile.multiarch → .docker/Dockerfile.multiarch
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:14 as builder
FROM node:14-alpine3.11 as builder

WORKDIR /app

COPY package*.json ./

RUN npm install --production
RUN apk --no-cache --virtual build-dependencies add python make g++ \
&& npm install --production

COPY . .

Expand All @@ -16,7 +17,7 @@ RUN mkdir -p ./public ./data \
&& mv ./client/build/* ./public \
&& rm -rf ./client

FROM node:14-alpine
FROM node:14-alpine3.11

COPY --from=builder /app /app

Expand All @@ -26,4 +27,4 @@ EXPOSE 5005

ENV NODE_ENV=production

CMD ["node", "server.js"]
CMD ["node", "server.js"]
File renamed without changes.