diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 35994b9a..f7a45388 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -36,4 +36,4 @@ jobs: - name: Run Hadolint uses: jbergstroem/hadolint-gh-action@v1 with: - dockerfile: "**/Dockerfile*" + dockerfile: "Dockerfile*" diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 00000000..49c344e7 --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,2 @@ +ignored: + - DL3013 diff --git a/Dockerfile.server b/Dockerfile.server index 03dac571..baa3b27b 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -1,13 +1,13 @@ -FROM python:3.8.12 +FROM docker.io/python:3.8.12 # need this for the Dash app EXPOSE 8050 # install pipenv -RUN pip install pipenv +RUN pip --no-cache-dir install pipenv # create a working directory -RUN mkdir explorer +# RUN mkdir explorer # set that directory as working dir WORKDIR /explorer @@ -27,5 +27,4 @@ COPY ./ /explorer/ # Description of how to choose the number of workers and threads. # common wisdom is (2*CPU)+1 workers: # https://medium.com/building-the-system/gunicorn-3-means-of-concurrency-efbb547674b7 -CMD gunicorn --bind :8050 app:server --workers 8 --threads 4 - +CMD [ "gunicorn", "--bind", ":8050", "app:server", "--workers", "8", "--threads", "4" ] diff --git a/Dockerfile.supervisor_workers b/Dockerfile.supervisor_workers index b40277ed..b892d5dd 100644 --- a/Dockerfile.supervisor_workers +++ b/Dockerfile.supervisor_workers @@ -1,16 +1,13 @@ -FROM python:3.8.12 +FROM docker.io/python:3.8.12 # need this for the Dash app EXPOSE 8050 -# install pipenv -RUN pip install pipenv - -# install supervisor -RUN pip install supervisor +# install pipenv supervisor +RUN pip --no-cache-dir install pipenv supervisor # copy config -ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # create a working directory RUN mkdir explorer @@ -30,4 +27,4 @@ RUN pipenv install --system --deploy COPY ./ /explorer/ # run supervisord -CMD supervisord +CMD [ "supervisord" ] diff --git a/Dockerfile.worker b/Dockerfile.worker index c3066558..328db707 100644 --- a/Dockerfile.worker +++ b/Dockerfile.worker @@ -1,13 +1,13 @@ -FROM python:3.8.12 +FROM docker.io/python:3.8.12 # need this for the Dash app EXPOSE 8050 # install pipenv -RUN pip install pipenv +RUN pip --no-cache-dir install pipenv # create a working directory -RUN mkdir explorer +# RUN mkdir explorer # set that directory as working dir WORKDIR /explorer @@ -24,4 +24,4 @@ RUN pipenv install --system --deploy COPY ./ /explorer/ # run worker -CMD rq worker -c worker_settings +CMD [ "rq", "worker", "-c", "worker_settings" ] diff --git a/scripts/launch_dev.sh b/scripts/launch_dev.sh old mode 100644 new mode 100755 index 1020d079..4c7b29b7 --- a/scripts/launch_dev.sh +++ b/scripts/launch_dev.sh @@ -1,3 +1,5 @@ +#!/bin/sh + # It's common to have access permission denied by the Docker Daemon # on Linux machines if you don't run Docker with root permissions.