2018-05-25 03:59:48 +01:00
|
|
|
# Using Alpine to keep the images smaller
|
2020-07-07 03:52:13 +01:00
|
|
|
# Change to using the official NodeJS Alpine container
|
2022-04-19 14:38:06 +01:00
|
|
|
FROM node:16-alpine
|
2018-05-25 03:59:48 +01:00
|
|
|
|
|
|
|
# Pushing all files into image
|
|
|
|
WORKDIR /app
|
2020-07-07 03:52:13 +01:00
|
|
|
COPY . /app
|
2018-05-25 03:59:48 +01:00
|
|
|
|
2023-01-10 14:21:38 +00:00
|
|
|
# Install Semaphore
|
2020-07-07 03:52:13 +01:00
|
|
|
RUN yarn --production --pure-lockfile && \
|
|
|
|
yarn build && \
|
|
|
|
yarn cache clean && \
|
|
|
|
rm -rf ./src ./docs ./tests ./bin
|
2018-05-25 03:59:48 +01:00
|
|
|
|
|
|
|
# Expose port 4002
|
|
|
|
EXPOSE 4002
|
|
|
|
|
2019-02-13 05:43:04 +00: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 07:12:50 +00:00
|
|
|
CMD PORT=4002 node server.js
|