diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..419f1fc4 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.git +node_modules + diff --git a/Dockerfile b/Dockerfile index 205a1560..aa6526f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,13 @@ FROM node:alpine + WORKDIR /omegasisters-webpage # Cache node packages -ADD package.json /omegasisters-webpage -ADD yarn.lock /omegasisters-webpage +# ADD doesn't make cache so you should use COPY +COPY package.json yarn.lock ./ + RUN yarn -ADD . /omegasisters-webpage +COPY . . ENTRYPOINT ["yarn", "start:docker"]