2018-05-25 03:59:48 +01: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 05:20:33 +01:00
|
|
|
RUN apk add nodejs npm git python build-base clang
|
2018-05-25 03:59:48 +01:00
|
|
|
|
2019-01-28 01:44:30 +00:00
|
|
|
# Install yarn
|
|
|
|
RUN npm i yarn -g
|
2018-05-25 03:59:48 +01:00
|
|
|
|
|
|
|
# Install Pinafore
|
2019-01-28 01:44:30 +00:00
|
|
|
RUN yarn --pure-lockfile
|
2019-02-10 19:30:00 +00:00
|
|
|
RUN yarn build
|
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
|
|
|
|
CMD PORT=4002 node __sapper__/build
|