From 05ef1a3843c4ff8f9fd4154ae90eb0b0c75df3fe Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Sun, 10 May 2020 09:54:00 +0200 Subject: [PATCH] use Alpine Linux to reduce image size --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f599e2..8ecd46e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node +FROM alpine LABEL \ maintainer="Davide Alberani " \ vendor="RaspiBO" @@ -6,12 +6,12 @@ LABEL \ EXPOSE 3000 RUN \ - apt-get update && \ - apt-get -y --no-install-recommends install \ + apk add --no-cache \ nodejs \ - python3-pymongo \ - python3-tornado && \ - rm -rf /var/lib/apt/lists/* + npm \ + py3-pip \ + py3-tornado && \ + pip3 install pymongo COPY . /ibt2 @@ -19,7 +19,7 @@ WORKDIR /ibt2/ RUN \ npm install && \ - nodejs build/build.js && \ + node build/build.js && \ rm -rf node_modules ENTRYPOINT ["./ibt2.py", "--mongo_url=mongodb://mongo", "--debug"]