Skip to content
Snippets Groups Projects
Select Git revision
  • 83c5d923f9e84a9c305d2ff30ce8917ba962ff87
  • main default protected
  • docker-images protected
  • docs protected
  • helm protected
5 results

Dockerfile.python

Blame
  • Dockerfile.python 1.39 KiB
    FROM harbor.pasteur.fr/images/python:${PYTHON_VERSION}
    
    # define geographic location during installation
    ENV TZ=Etc/UTC
    ENV DEBIAN_FRONTEND=noninteractive
    
    EXPOSE 3838
    CMD ["shiny-server"]
    
    # install dependencies
    RUN apt-get update \
     && apt-get install -y \
         software-properties-common \
         wget \
         nano \
         wget \
         curl \
         lsb-release \
         libcurl4-openssl-dev \
         gcc \
         gfortran \
         g++ \
         libreadline-dev \
         zlib1g-dev \
         libbz2-dev \
         liblzma-dev \
         libpcre2-dev \
         libcairo-dev \
         libpng-dev \
         libicu-dev \
         libxml2-dev \
         libssl-dev \
         make \
         libtiff-dev \
         xorg-dev \
         libx11-dev \
     && rm -rf /var/lib/apt/lists/*
    
    # Upgrade pip and install wheel, shiny :
    RUN pip install --no-cache-dir --upgrade pip \
     && python -m pip install wheel shiny
    
    # Install shiny server
    ARG SHINY_SERVER_VERSION=latest
    RUN mkdir /opt/scripts
    COPY ./scripts/install_shiny_server.sh /opt/scripts/install_shiny_server.sh
    RUN /opt/scripts/install_shiny_server.sh
    
    # allows trafic from all ips
    RUN sed -i "s/3838/3838 0.0.0.0/g" /etc/shiny-server/shiny-server.conf
    
    # grant shiny to created bookmark state directory in this directory
    RUN chown shiny:shiny /var/lib/shiny-server
    # grant shiny to write logs
    RUN mkdir -p /var/log/shiny-server \
     && chown shiny:shiny /var/log/shiny-server
    
    # Create an example app 
    RUN shiny create /srv/shiny-server/.