Skip to content

Commit

Permalink
dev(docker): dockerfile folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjeneer committed Mar 7, 2023
1 parent 2489f85 commit 9786ef7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$PLATFORM node:alpine as builder
FROM node:alpine as builder
WORKDIR /app
COPY --chown=node:node package.json yarn.lock ./
RUN yarn install --frozen-lockfile
Expand Down
21 changes: 21 additions & 0 deletions DockerfileARM
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Build stage
FROM --platform=linux/arm64 node:alpine as builder
# RUN apk update
RUN apk add make
RUN apk add g++
RUN apk add py3-pip

WORKDIR /app
COPY --chown=node:node package.json yarn.lock ./
RUN npm install

COPY --chown=node:node . .
RUN yarn build


# Prod stage
FROM node:alpine as prod
WORKDIR /app
COPY --from=builder /app/node_modules ./dist/node_modules
COPY --from=builder /app/dist/src ./dist/src
CMD ["node", "dist/src/index.js"]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.8'
services:
request-service:
build:
dockerfile: ./Dockerfile.dev
dockerfile: ./docker/Dockerfile.dev
target: dev
context: ./

Expand Down

0 comments on commit 9786ef7

Please sign in to comment.