-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multistage Builder for Compiled Modules
- Loading branch information
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] | ||
|