Skip to content

Commit

Permalink
Multistage Builder for Compiled Modules
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Aug 22, 2024
1 parent 5c212d6 commit 207ed14
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# PaStash Docker Example
FROM node:20-slim

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json /usr/src/app/
# PaStash Docker Builder
FROM node:20-slim as builder
RUN apt update && apt install -y python3 make gcc g++
RUN mkdir -p /app
WORKDIR /app
COPY package.json /app/
RUN npm install
COPY . /app

COPY . /usr/src/app

# PaStash Docker Container
FROM node:20-slim
RUN mkdir -p /config

COPY --from=builder /app /app
WORKDIR /app
EXPOSE 8080
CMD [ "bin/pastash", "--config_dir", "/config" ]

0 comments on commit 207ed14

Please sign in to comment.