UNPKG

873 BPlain TextView Raw
1FROM node:alpine
2
3LABEL name="Mike Erickson"
4LABEL maintainer="codedungeon@gmail.com"
5
6COPY ./docker/.profile /root/.profile
7COPY ./docker/aliases.sh /root/aliases.sh
8
9# create directory in container
10RUN mkdir -p /usr/code/app
11WORKDIR /usr/code/app
12
13# copy any files necessary for including modules
14COPY package.json /usr/code/app/
15COPY yarn.lock /usr/code/app/
16
17# install node modules, this should be done with yarn instead
18RUN yarn install
19
20# copy over files to container (node_modules should be ignored as deifned in .dockerignore)
21COPY . /usr/code/app
22
23# this is not required as the container is not hosting any network resoruces
24# ENV PORT 3000
25# EXPOSE ${PORT}
26
27# kick off the tests
28CMD [ "yarn","run", "test" ]
29
30# run container as follows
31# make sure to use the -l so it will load profile
32# docker run --name debug-ci -v$(pwd):/usr/code/app --rm -it dev-node ash -l
\No newline at end of file