Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Dockerfile #334

Open
JGAntunes opened this issue Nov 22, 2016 · 0 comments
Open

Create Dockerfile #334

JGAntunes opened this issue Nov 22, 2016 · 0 comments

Comments

@JGAntunes
Copy link
Member

This is just an example pulled from other projects which might have different requirements from this one (it's a node app still, but doesn't need mongo and other stuff). But it might be cool to use this as a basis for something else.

The idea is to containerise the app and have it running on a single container. From there we'll see what we'll use.

FROM alpine

WORKDIR /code

ENV APK_PACKAGES bash
ENV NODE_ENV production
ENV PORT 3000

RUN apk \
    --update-cache --repository http://dl-2.alpinelinux.org/alpine/edge/main \
    --update add \
    "nodejs<7.0.0" \
    ${APK_PACKAGES} \
    && rm -rf /var/cache/apk/*

RUN npm install -g yarn && rm -rf ~/.npm

EXPOSE 3000

COPY package.json yarn.lock ./
RUN yarn && rm -rf ~/.yarn-cache
COPY . .
CMD [ "node", "src/index.js" ]

LABEL \
    version="" \
    os="linux" \
    arch="amd64"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants