diff --git a/.dockerignore b/.dockerignore index b0959cb..7b49a06 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,16 @@ node_modules -.git* -.cache +npm-debug.log +Dockerfile* +docker-compose* +.dockerignore +.git +.gitignore +README.md +LICENSE +.vscode public +.cache +.travis.yml +package-lock.json +README.md +coverage diff --git a/Dockerfile b/Dockerfile index d495a9e..390f23f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,24 @@ +# Dockerfile for local development just installing dependencies. +# Use together with `docker-compose up` FROM node:alpine -RUN apk update && \ - apk add --update --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing \ - g++ \ - git \ - make \ - bash \ - python \ - && rm -rf /var/cache/apk/* - RUN mkdir -p /portfolio WORKDIR /portfolio - COPY package.json . -RUN npm install && npm cache clean --force +RUN apk add --no-cache --virtual .build-deps \ + g++ \ + make \ + autoconf \ + automake \ + libtool \ + nasm \ + libc6-compat \ + libjpeg-turbo-dev \ + libpng-dev \ + git \ + bash \ + && rm -rf /var/cache/apk/* \ + && npm install \ + && npm cache clean --force \ + && apk del .build-deps diff --git a/docker-compose.yml b/docker-compose.yml index df6ffea..7673b83 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ version: '3' services: - gatsby: + dev: build: . command: npm run dev volumes: