service-semaphore/Dockerfile
glenux fd62dc9e57
All checks were successful
continuous-integration/drone/push Build is passing
Bump alpine version to 18
2023-07-06 10:25:16 +00:00

27 lines
781 B
Docker

# Using Alpine to keep the images smaller
# Change to using the official NodeJS Alpine container
FROM node:18-alpine
# Pushing all files into image
ENV SEMAPHORE_VERSION=1.0.0
WORKDIR /app
RUN wget -q "https://github.com/NickColley/semaphore/archive/refs/tags/$SEMAPHORE_VERSION.tar.gz" \
-O /tmp/semaphore.tar.gz \
&& tar xavf /tmp/semaphore.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
ENV PORT=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 ["node", "server.js"]