From a8460d3c7b32d7f57a89b0048b3d34cb515a0baa Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Sun, 21 Oct 2018 15:23:23 +0200 Subject: [PATCH] Add a Dockerfile.dev for manual testing during development. In some cases mounting node_modules in the container leads to shared library linking issues (libcrypt.so) for instance. --- Dockerfile.dev | 20 ++++++++++++++++++++ docker-compose.dev.yml | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 Dockerfile.dev diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 000000000..6eede7cc7 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,20 @@ +FROM node:8.7.0-alpine + +WORKDIR /usr/src + +COPY package.json /usr/src/package.json + +RUN apk --update add --no-cache --virtual \ + .build-deps make g++ python && \ + npm install && \ + apk del .build-deps + +COPY dist/server /usr/src/server +COPY dist/shared /usr/src/shared + +EXPOSE 8080 + +VOLUME /etc/authelia +VOLUME /var/lib/authelia + +CMD ["node", "server/src/index.js", "/etc/authelia/config.yml"] diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 1e1abcb0e..f36479753 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -3,16 +3,16 @@ services: authelia: build: context: . - dockerfile: Dockerfile + dockerfile: Dockerfile.dev restart: always volumes: - ./server:/usr/src/server - ./dist/server/src/public_html:/usr/src/server/src/public_html - ./client:/usr/src/client - ./shared:/usr/src/shared - - ./node_modules:/usr/src/node_modules - ./config.minimal.yml:/etc/authelia/config.yml:ro - /tmp/authelia:/tmp/authelia + - ./users_database.yml:/etc/authelia/users_database.yml environment: - NODE_TLS_REJECT_UNAUTHORIZED=0 depends_on: