2018-05-25 04:59:48 +02:00
|
|
|
# Using Alpine to keep the images smaller
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
# Pushing all files into image
|
|
|
|
WORKDIR /app
|
|
|
|
ADD . /app
|
|
|
|
|
|
|
|
# Install updates and NodeJS+Dependencies
|
|
|
|
RUN apk update && apk upgrade
|
2018-08-19 06:20:33 +02:00
|
|
|
RUN apk add nodejs npm git python build-base clang
|
2018-05-25 04:59:48 +02:00
|
|
|
|
2019-01-28 02:44:30 +01:00
|
|
|
# Install yarn
|
|
|
|
RUN npm i yarn -g
|
2018-05-25 04:59:48 +02:00
|
|
|
|
|
|
|
# Install Pinafore
|
2019-01-28 02:44:30 +01:00
|
|
|
RUN yarn --pure-lockfile
|
2019-02-10 20:30:00 +01:00
|
|
|
RUN yarn build
|
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
|