2018-05-25 04:59:48 +02:00
|
|
|
# Using Alpine to keep the images smaller
|
2020-07-07 04:52:13 +02:00
|
|
|
# Change to using the official NodeJS Alpine container
|
2022-04-19 15:38:06 +02:00
|
|
|
FROM node:16-alpine
|
2018-05-25 04:59:48 +02:00
|
|
|
|
|
|
|
# Pushing all files into image
|
|
|
|
WORKDIR /app
|
2020-07-07 04:52:13 +02:00
|
|
|
COPY . /app
|
2018-05-25 04:59:48 +02:00
|
|
|
|
|
|
|
# Install Pinafore
|
2020-07-07 04:52:13 +02:00
|
|
|
RUN yarn --production --pure-lockfile && \
|
|
|
|
yarn build && \
|
|
|
|
yarn cache clean && \
|
|
|
|
rm -rf ./src ./docs ./tests ./bin
|
2018-05-25 04:59:48 +02:00
|
|
|
|
|
|
|
# Expose port 4002
|
|
|
|
EXPOSE 4002
|
|
|
|
|
2019-02-13 06:43:04 +01:00
|
|
|
# Setting run-command, using explicit `node` command
|
|
|
|
# rather than `yarn` or `npm` to use less memory
|
|
|
|
# https://github.com/nolanlawson/pinafore/issues/971
|
2019-02-13 08:12:50 +01:00
|
|
|
CMD PORT=4002 node server.js
|