diff --git a/README.md b/README.md index 51b8a57..613a6f0 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ Table of Contents * [Docker-compose](#docker-compose) * [Versioning](#versioning) * [FAQ](#faq) - * [TODOs](#todos) ## Quick Start For testing purposes (to see if this thing works on your machine) you can run the container in `privileged` mode but this is not recommended, [read](https://learn.snyk.io/lesson/container-runs-in-privileged-mode/). @@ -114,5 +113,3 @@ If you are getting the following error: /opt/gcups/gcups[101]: ../../third_party/electron_node/src/node_api.cc:1332:napi_status napi_release_threadsafe_function(napi_threadsafe_function, napi_threadsafe_function_release_mode): Assertion `(func) != nullptr' failed. ``` Then you have your UPS connected via USB and provided a wrong `--device` for the docker image. This will obviously make the HTTP server unable to start. -## TODOs -- Optimize image size (it's 1.31G as of now which I think is way too much) diff --git a/gcups/Dockerfile b/gcups/Dockerfile index 499df19..b71f0d2 100644 --- a/gcups/Dockerfile +++ b/gcups/Dockerfile @@ -7,14 +7,15 @@ RUN apt-get update && apt-get install --no-install-recommends -y wget gpg xvfb l python3 -m pip --no-cache-dir install plyvel && \ python3 -m pip --no-cache-dir uninstall setuptools wheel && \ apt-get remove -y python3-pip && \ - mkdir -m775 -p /opt/gcups/db/gcups-rxdb-1-settings + mkdir -m775 -p /opt/gcups/db/gcups-rxdb-1-settings && \ + rm -rf /opt/gcups/license /opt/gcups/manuals COPY init.sh populate-db.py db.txt /opt/ WORKDIR /opt RUN python3 populate-db.py -ENV GCUPS_HTTP_PORT=8080 GCUPS_PASSWORD=gcups123 - +ENV GCUPS_HTTP_PORT=8080 +ENV GCUPS_PASSWORD=gcups123 EXPOSE $GCUPS_HTTP_PORT ENTRYPOINT ["/opt/init.sh"]