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 \
maintainer="Davide Alberani <da@erlug.linux.it>" \
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"]