Skip to content

Commit

Permalink
Use yarn
Browse files Browse the repository at this point in the history
  * update Dockerfile
    - need the `apt-transport-https` until
    docker-library/buildpack-deps#55 is resolved
    - do not use `onbuild` and install yarn manually until
    nodejs/docker-node#243 is implemented
    - need `CMD` without `onbuild`
  * generate yarn.lock
  • Loading branch information
Pamplemousse committed Jan 3, 2017
1 parent faad235 commit 61f9eb1
Show file tree
Hide file tree
Showing 2 changed files with 2,399 additions and 1 deletion.
24 changes: 23 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
FROM node:6-onbuild
FROM node:6

# TODO: remove once https://github.com/docker-library/buildpack-deps/issues/55 is resolved
RUN apt-get update && apt-get install apt-transport-https

# TODO: install yarn manually until https://github.com/nodejs/docker-node/issues/243 is implemented
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install yarn

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ONBUILD ARG NODE_ENV
ONBUILD ENV NODE_ENV $NODE_ENV

COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/

RUN yarn install
COPY . /usr/src/app

RUN npm run build

EXPOSE 8000

CMD ["npm", "start"]
Loading

0 comments on commit 61f9eb1

Please sign in to comment.