use Alpine Linux to reduce image size

This commit is contained in:
Davide Alberani 2020-05-10 09:54:00 +02:00
parent 2a89674275
commit 05ef1a3843

View file

@ -1,4 +1,4 @@
FROM node FROM alpine
LABEL \ LABEL \
maintainer="Davide Alberani <da@erlug.linux.it>" \ maintainer="Davide Alberani <da@erlug.linux.it>" \
vendor="RaspiBO" vendor="RaspiBO"
@ -6,12 +6,12 @@ LABEL \
EXPOSE 3000 EXPOSE 3000
RUN \ RUN \
apt-get update && \ apk add --no-cache \
apt-get -y --no-install-recommends install \
nodejs \ nodejs \
python3-pymongo \ npm \
python3-tornado && \ py3-pip \
rm -rf /var/lib/apt/lists/* py3-tornado && \
pip3 install pymongo
COPY . /ibt2 COPY . /ibt2
@ -19,7 +19,7 @@ WORKDIR /ibt2/
RUN \ RUN \
npm install && \ npm install && \
nodejs build/build.js && \ node build/build.js && \
rm -rf node_modules rm -rf node_modules
ENTRYPOINT ["./ibt2.py", "--mongo_url=mongodb://mongo", "--debug"] ENTRYPOINT ["./ibt2.py", "--mongo_url=mongodb://mongo", "--debug"]