Created
February 1, 2017 22:04
-
-
Save yurifrl/bf18df1919eb3cebd375aae4bc4451e9 to your computer and use it in GitHub Desktop.
Docker yarn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/containership/alpine-node-yarn/blob/master/Dockerfile | |
FROM node:alpine | |
# Add yarn to env | |
# Ember-cli need this TEMP https://github.com/stefanpenner/async-disk-cache/issues/31 | |
ENV PATH /root/.yarn/bin:$PATH | |
ENV TMPDIR /tmp | |
# | |
RUN apk update && apk upgrade && \ | |
apk --update add --no-cache --virtual .yarn-deps ca-certificates curl tar && \ | |
update-ca-certificates && \ | |
rm -rf /var/cache/apk/* && \ | |
curl -o- -L https://yarnpkg.com/install.sh | sh -s && \ | |
apk del .yarn-deps && \ | |
npm uninstall -g npm && \ | |
rm -rf ~/.npm | |
# | |
RUN yarn global add mocha nyc babel-cli istanbul isparta phantomjs watchman bower ember-cli | |
# App | |
WORKDIR /usr/local/src/ | |
# Be more eficient | |
COPY package.json yarn.lock bower.json /usr/local/src/ | |
# Get project deps | |
RUN bower install --allow-root && yarn --pure-lockfile | |
# Copy the files | |
COPY . /usr/local/src | |
# Expose ports | |
EXPOSE 80 443 | |
# Image command | |
CMD ["yarn", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment