mirror of
https://github.com/nolanlawson/pinafore
synced 2024-12-12 02:07:26 +01:00
05a3b2d31f
The `node:alpine` Docker image appears to have recently been updated to point to Node 17, breaking new builds of Pinafore. This commit explicitly specifies Node 16 until the underlying reason for the build failure on 17+ can be fixed.
22 lines
538 B
Docker
22 lines
538 B
Docker
# Using Alpine to keep the images smaller
|
|
# Change to using the official NodeJS Alpine container
|
|
FROM node:16-alpine
|
|
|
|
# Pushing all files into image
|
|
WORKDIR /app
|
|
COPY . /app
|
|
|
|
# Install Pinafore
|
|
RUN yarn --production --pure-lockfile && \
|
|
yarn build && \
|
|
yarn cache clean && \
|
|
rm -rf ./src ./docs ./tests ./bin
|
|
|
|
# Expose port 4002
|
|
EXPOSE 4002
|
|
|
|
# Setting run-command, using explicit `node` command
|
|
# rather than `yarn` or `npm` to use less memory
|
|
# https://github.com/nolanlawson/pinafore/issues/971
|
|
CMD PORT=4002 node server.js
|