Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
abretaud committed Nov 22, 2023
1 parent ab3f088 commit 520ff59
Showing 1 changed file with 53 additions and 65 deletions.
118 changes: 53 additions & 65 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,103 +4,91 @@ WORKDIR /root
ENV BIOMAJ_CONFIG=/root/config.yml
ENV prometheus_multiproc_dir=/tmp/biomaj-prometheus-multiproc

RUN rm -rf /tmp/biomaj-prometheus-multiproc
RUN mkdir -p /tmp/biomaj-prometheus-multiproc
RUN rm -rf /tmp/biomaj-prometheus-multiproc && \
mkdir -p /tmp/biomaj-prometheus-multiproc

RUN apt-get update && apt-get install -y apt-transport-https curl libcurl4-openssl-dev python3-pycurl python3-setuptools python3-pip git unzip bzip2 ca-certificates jq --no-install-recommends

Check failure on line 10 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 10 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3009 info: Delete the apt-get lists after installing something

Check failure on line 10 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 10 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3009 info: Delete the apt-get lists after installing something

# Install docker to allow docker execution from process-message
RUN buildDeps='gnupg2 dirmngr software-properties-common' \

Check failure on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3009 info: Delete the apt-get lists after installing something

Check failure on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3009 info: Delete the apt-get lists after installing something

Check failure on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
&& set -x \
&& apt-get install -y $buildDeps --no-install-recommends \
&& apt-get install -y "$buildDeps" --no-install-recommends \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
&& apt-get update \
&& apt-get install -y docker-ce-cli \
&& apt-get purge -y --auto-remove $buildDeps
&& apt-get install --no-install-recommends -y docker-ce-cli \
&& apt-get purge -y --auto-remove "$buildDeps"

ENV BIOMAJ_RELEASE="shahikorma-v13"

RUN git clone https://github.com/genouest/biomaj-core.git
#RUN easy_install3 pip
RUN pip3 install setuptools --upgrade

RUN git clone https://github.com/genouest/biomaj-zipkin.git

RUN git clone https://github.com/genouest/biomaj-user.git

RUN git clone https://github.com/genouest/biomaj-cli.git

RUN git clone https://github.com/genouest/biomaj-process.git

RUN git clone https://github.com/genouest/biomaj-download.git

RUN git clone https://github.com/genouest/biomaj.git && echo "Install biomaj"

RUN git clone https://github.com/genouest/biomaj-daemon.git && echo "Install daemon"

RUN git clone https://github.com/genouest/biomaj-watcher.git && echo "Install biomaj-watcher"

RUN git clone https://github.com/genouest/biomaj-ftp.git

RUN git clone https://github.com/genouest/biomaj-release.git

RUN git clone https://github.com/genouest/biomaj-data.git
RUN git clone https://github.com/genouest/biomaj-core.git && \
git clone https://github.com/genouest/biomaj-zipkin.git && \
git clone https://github.com/genouest/biomaj-user.git && \
git clone https://github.com/genouest/biomaj-cli.git && \
git clone https://github.com/genouest/biomaj-process.git && \
git clone https://github.com/genouest/biomaj-download.git && \
git clone https://github.com/genouest/biomaj.git && \
git clone https://github.com/genouest/biomaj-daemon.git && \
git clone https://github.com/genouest/biomaj-watcher.git && \
git clone https://github.com/genouest/biomaj-ftp.git && \
git clone https://github.com/genouest/biomaj-release.git && \
git clone https://github.com/genouest/biomaj-data.git

ENV BIOMAJ_CONFIG=/etc/biomaj/config.yml

RUN mkdir -p /var/log/biomaj

RUN pip3 install greenlet==0.4.17
RUN pip3 install gevent==1.4.0
RUN pip3 install graypy
RUN pip3 install pymongo==3.12.3
RUN pip3 install redis==3.5.3
RUN pip3 install wheel
RUN pip3 install PyYAML==5.3.1
RUN pip3 install setuptools --upgrade && \

Check failure on line 41 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 41 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`

Check failure on line 41 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 41 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
pip3 install --no-cache-dir greenlet==0.4.17 && \
pip3 install --no-cache-dir gevent==1.4.0 && \
pip3 install --no-cache-dir graypy && \
pip3 install --no-cache-dir pymongo==3.12.3 && \
pip3 install --no-cache-dir redis==3.5.3 && \
pip3 install --no-cache-dir wheel && \
pip3 install --no-cache-dir PyYAML==5.3.1

ENV SUDO_FORCE_REMOVE=yes
RUN buildDeps='gcc python3-dev protobuf-compiler' \
RUN buildDeps="gcc python3-dev protobuf-compiler" \

Check failure on line 51 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 51 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 51 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 51 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL3003 warning: Use WORKDIR to switch to a directory
&& set -x \
&& apt-get install -y $buildDeps --no-install-recommends \
&& cd /root/biomaj-core && python3 setup.py build && pip3 install . \
&& cd /root/biomaj-zipkin && python3 setup.py build && pip3 install . \
&& cd /root/biomaj-user && python3 setup.py build && pip3 install . \
&& cd /root/biomaj-cli && python3 setup.py build && pip3 install . \
&& apt-get install -y "$buildDeps" --no-install-recommends \
&& cd /root/biomaj-core && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-zipkin && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-user && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-cli && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-process/biomaj_process/message && protoc --python_out=. procmessage.proto \
&& cd /root/biomaj-process && python3 setup.py build && pip3 install . \
&& cd /root/biomaj-process && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-download/biomaj_download/message && protoc --python_out=. downmessage.proto \
&& cd /root/biomaj-download && python3 setup.py build && pip3 install . \
&& cd /root/biomaj && python3 setup.py build && pip3 install . \
&& cd /root/biomaj-daemon && python3 setup.py build && pip3 install . \
&& cd /root/biomaj-watcher && pip3 install -r requirements.txt && pip3 install . \
&& cd /root/biomaj-ftp && python3 setup.py build && pip3 install . \
&& cd /root/biomaj-release && python3 setup.py build && pip3 install . \
&& cd /root/biomaj-data && python3 setup.py build && pip3 install . \
&& apt-get install -y wget bzip2 ca-certificates curl git \
&& cd /root/biomaj-download && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-daemon && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-watcher && pip3 install --no-cache-dir -r requirements.txt && pip3 install --no-cache-dir . \
&& cd /root/biomaj-ftp && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-release && python3 setup.py build && pip3 install --no-cache-dir . \
&& cd /root/biomaj-data && python3 setup.py build && pip3 install --no-cache-dir . \
&& apt-get install --no-install-recommends -y wget bzip2 ca-certificates curl git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge -y --auto-remove $buildDeps
&& apt-get purge -y --auto-remove "$buildDeps"



#RUN apt-get update --fix-missing && \
# apt-get install -y wget bzip2 ca-certificates curl git && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
RUN pip3 uninstall -y gunicorn && pip3 install gunicorn==19.9.0
RUN pip3 uninstall -y greenlet && pip3 install greenlet==0.4.15
RUN pip3 uninstall -y gevent && pip3 install gevent==1.3.7
RUN pip3 uninstall -y gunicorn && pip3 install --no-cache-dir gunicorn==19.9.0 && \
pip3 uninstall -y greenlet && pip3 install --no-cache-dir greenlet==0.4.15 && \
pip3 uninstall -y gevent && pip3 install --no-cache-dir gevent==1.3.7



#Conda installation and give write permissions to conda folder
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \

Check failure on line 86 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL4001 warning: Either use Wget or Curl but not both

Check failure on line 86 in Dockerfile

View workflow job for this annotation

GitHub Actions / lint

DL4001 warning: Either use Wget or Curl but not both
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda config --add channels r && \
/opt/conda/bin/conda config --add channels bioconda && \
/opt/conda/bin/conda upgrade -y conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda config --add channels r && \
/opt/conda/bin/conda config --add channels bioconda && \
/opt/conda/bin/conda upgrade -y conda && \
chmod 777 -R /opt/conda/


Expand All @@ -125,11 +113,11 @@ COPY biomaj-config/gunicorn_conf.py /etc/biomaj/gunicorn_conf.py
COPY watcher.sh /root/watcher.sh

# Local test configuration
RUN mkdir -p /etc/biomaj/conf.d
RUN mkdir -p /var/log/biomaj
RUN mkdir -p /etc/biomaj/process.d
RUN mkdir -p /var/cache/biomaj
RUN mkdir -p /var/run/biomaj
RUN mkdir -p /etc/biomaj/conf.d && \
mkdir -p /var/log/biomaj && \
mkdir -p /etc/biomaj/process.d && \
mkdir -p /var/cache/biomaj && \
mkdir -p /var/run/biomaj
COPY test-local/etc/biomaj/global_local.properties /etc/biomaj/global_local.properties
COPY test-local/etc/biomaj/conf.d/alu.properties /etc/biomaj/conf.d/alu.properties

Expand Down

0 comments on commit 520ff59

Please sign in to comment.