feat: Add dockerfile
This commit is contained in:
parent
334f39e1a7
commit
9ad82bbe21
1 changed files with 25 additions and 0 deletions
25
Dockerfile
Normal file
25
Dockerfile
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# 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
|
||||||
|
RUN wget -q https://github.com/NickColley/semaphore/archive/refs/tags/1.0.0.tar.gz \
|
||||||
|
-O /tmp/semaphore.tar.gz \
|
||||||
|
&& tar xavf /tmp/1.0.0.tar.gz --strip-components 1 \
|
||||||
|
&& rm -f /tmp/semaphore.tar.gz
|
||||||
|
|
||||||
|
# Install Semaphore
|
||||||
|
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"]
|
||||||
|
|
Loading…
Reference in a new issue