Last active
September 24, 2019 10:05
-
-
Save unix2xp/95d7dc8ffa24c68a525bdfa3f90c1adb to your computer and use it in GitHub Desktop.
Dockerfile for jupyter environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pzserver: | |
| image: pz:2 | |
| ports: | |
| - "33:22" | |
| volumes: | |
| - /home/samx/stkdata/notebooks/lyd_result:/home/pz | |
| command: | |
| bash -c "/etc/init.d/ssh start && tail -f /dev/null" | |
| restart: always | |
| mynotebook: | |
| image: mynotebook:2 | |
| ports: | |
| - "7777:8888" | |
| volumes: | |
| - /home/samx/stkdata/notebooks:/home/samx/notebooks | |
| restart: always | |
| publicshare: | |
| image: jenserat/samba-publicshare | |
| ports: | |
| - "445:445" | |
| - "137:137" | |
| - "138:138" | |
| - "139:139" | |
| volumes: | |
| - ~/samba:/srv | |
| tty: true | |
| restart: always | |
| twistd: | |
| image: twist:1 | |
| ports: | |
| - "80:8080" | |
| volumes: | |
| - ~/samba:/root/www | |
| restart: always | |
| kodexplorer: | |
| image: ylck/kodexplorer-docker | |
| restart: "always" | |
| ports: | |
| - "8080:80" | |
| volumes: | |
| - ~/dkimg/kode/data/User:/var/www/html/data/User | |
| - ~/dkimg/kode/data/Group/public/home:/var/www/html/data/Group/public/home | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get remove docker docker-engine docker.io | |
| sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo apt-key fingerprint 0EBFCD88 | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
| sudo apt-get update | |
| sudo apt-get install docker-ce -y | |
| sudo usermod -a -G docker $USER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:latest | |
| MAINTAINER x zx unix2xp@gmail.com | |
| RUN apt-get update && apt-get install --no-install-recommends -y -q wget bzip2 nano tzdata sudo unzip && rm /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata && useradd -ms /bin/bash samx && addgroup samx sudo | |
| USER samx | |
| RUN wget --no-check-certificate https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && bash ~/miniconda.sh -b -p ~/miniconda && rm ~/miniconda.sh && ~/miniconda/bin/conda install numpy pandas lxml jupyter -y && ~/miniconda/bin/pip install bs4 && ~/miniconda/bin/pip install threadpool tushare pyecharts pyecharts_snapshot apscheduler && cd ~ && wget --no-check-certificate https://gist.github.com/unix2xp/95d7dc8ffa24c68a525bdfa3f90c1adb/raw/7e71ccf459215ff1ba90176fd5ec0f7ca965eace/jupyter_config.py https://gist.github.com/unix2xp/95d7dc8ffa24c68a525bdfa3f90c1adb/raw/7e71ccf459215ff1ba90176fd5ec0f7ca965eace/startnb.sh && mkdir /home/samx/notebooks | |
| WORKDIR /home/samx/notebooks | |
| CMD ["sh", "/home/samx/startnb.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Original from https://hub.docker.com/r/yangxuan8282/kodexplorer/~/dockerfile/ | |
| FROM php:7.1-alpine | |
| ENV KODEXPLORER_VERSION=3.4.6 | |
| ENV KODEXPLORER_URL="https://github.com/kalcaddle/KodExplorer/archive/master.zip" | |
| RUN set -x \ | |
| && mkdir -p /usr/src/kodexplorer \ | |
| && apk --update --no-cache add wget bash unzip \ | |
| && wget -O /tmp/kodexplorer.tar.gz "$KODEXPLORER_URL" \ | |
| && unzip /tmp/kodexplorer.tar.gz -d /usr/src/kodexplorer/ \ | |
| && rm -rf /tmp/* | |
| RUN set -x \ | |
| && apk add --no-cache --update \ | |
| freetype libpng libjpeg-turbo \ | |
| freetype-dev libpng-dev libjpeg-turbo-dev \ | |
| && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
| && docker-php-ext-install -j "$(getconf _NPROCESSORS_ONLN)" gd \ | |
| && apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev | |
| WORKDIR /var/www/html | |
| COPY entrypoint.sh /usr/local/bin/ | |
| EXPOSE 80 | |
| ENTRYPOINT ["entrypoint.sh"] | |
| CMD [ "php", "-S", "0000:80", "-t", "/var/www/html" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:latest | |
| MAINTAINER x zx unix2xp@gmail.com | |
| ADD https://gist.github.com/unix2xp/95d7dc8ffa24c68a525bdfa3f90c1adb/raw/d0a8fa0109eeef124ad02a9d522fcdcbfd5912d8/jupyter_config.py /root/jupyter_config.py | |
| ADD https://gist.github.com/unix2xp/95d7dc8ffa24c68a525bdfa3f90c1adb/raw/d0a8fa0109eeef124ad02a9d522fcdcbfd5912d8/startnb.sh /root/startnb.sh | |
| RUN cd ~ && chmod +x ~/startnb.sh && apt-get update && apt-get install wget bzip2 nano -y && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && bash ~/miniconda.sh -b -p ~/miniconda && rm ~/miniconda.sh && ~/miniconda/bin/conda install numpy pandas lxml jupyter -y && ~/miniconda/bin/pip install bs4 && ~/miniconda/bin/pip install tushare && mkdir ~/notebooks && cd ~/notebooks | |
| WORKDIR /root/notebooks/ | |
| CMD ["sh", "/root/startnb.sh"] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:latest | |
| MAINTAINER x zx unix2xp@gmail.com | |
| RUN apt-get update && apt-get install --no-install-recommends -y -q python-twisted && mkdir /root/www | |
| WORKDIR /root/www | |
| CMD twistd -no web --path=. --port=8080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:latest | |
| MAINTAINER x zx unix2xp@gmail.com | |
| RUN apt-get update && apt-get install --no-install-recommends -y -q wget bzip2 nano tzdata sudo unzip && rm /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata && useradd -ms /bin/bash samx && addgroup samx sudo | |
| USER samx | |
| RUN wget --no-check-certificate https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && bash ~/miniconda.sh -b -p ~/miniconda && rm ~/miniconda.sh && ~/miniconda/bin/conda install numpy pandas lxml jupyter -y && ~/miniconda/bin/pip install bs4 && ~/miniconda/bin/pip install tushare pyecharts && cd ~ && wget --no-check-certificate https://gist.github.com/unix2xp/95d7dc8ffa24c68a525bdfa3f90c1adb/raw/7e71ccf459215ff1ba90176fd5ec0f7ca965eace/jupyter_config.py https://gist.github.com/unix2xp/95d7dc8ffa24c68a525bdfa3f90c1adb/raw/7e71ccf459215ff1ba90176fd5ec0f7ca965eace/startnb.sh && mkdir /home/samx/notebooks | |
| WORKDIR /home/samx/notebooks | |
| CMD ["sh", "/root/startnb.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM php:7.0-apache | |
| LABEL maintainer="zerozwy@gmail.com" | |
| RUN apt update && apt install -y libjpeg-dev libpng-dev libfreetype6-dev libmagickwand-dev imagemagick unzip wget \ | |
| && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
| && docker-php-ext-install gd && pecl install imagick && docker-php-ext-enable imagick | |
| RUN wget https://github.com/Studio-42/elFinder/archive/2.1.50.zip && unzip 2.1.50.zip && rm -f 2.1.50.zip && mv elFinder-2.1.50/* ./ && rm -rf elFinder-2.1.50 | |
| RUN chown -R www-data:www-data * && mv php/connector.minimal.php-dist php/connector.minimal.php | |
| RUN echo "DirectoryIndex elfinder.html" >> .htaccess | |
| VOLUME [ "/var/www/html/files" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://hub.docker.com/r/littlewood/elfinder/dockerfile | |
| FROM php:7.1-apache | |
| # install the PHP extensions we need (https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions) | |
| RUN set -ex; \ | |
| \ | |
| savedAptMark="$(apt-mark showmanual)"; \ | |
| \ | |
| apt-get update; \ | |
| apt-get install -y --no-install-recommends \ | |
| libjpeg-dev \ | |
| libmagickwand-dev \ | |
| libpng-dev \ | |
| ; \ | |
| \ | |
| docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \ | |
| docker-php-ext-install \ | |
| bcmath \ | |
| exif \ | |
| gd \ | |
| mysqli \ | |
| opcache \ | |
| zip \ | |
| ; \ | |
| pecl install imagick-3.4.4; \ | |
| docker-php-ext-enable imagick; \ | |
| \ | |
| # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies | |
| apt-mark auto '.*' > /dev/null; \ | |
| apt-mark manual $savedAptMark; \ | |
| ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ | |
| | awk '/=>/ { print $3 }' \ | |
| | sort -u \ | |
| | xargs -r dpkg-query -S \ | |
| | cut -d: -f1 \ | |
| | sort -u \ | |
| | xargs -rt apt-mark manual; \ | |
| \ | |
| apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ | |
| rm -rf /var/lib/apt/lists/* | |
| # set recommended PHP.ini settings | |
| # see https://secure.php.net/manual/en/opcache.installation.php | |
| RUN { \ | |
| echo 'opcache.memory_consumption=128'; \ | |
| echo 'opcache.interned_strings_buffer=8'; \ | |
| echo 'opcache.max_accelerated_files=4000'; \ | |
| echo 'opcache.revalidate_freq=2'; \ | |
| echo 'opcache.fast_shutdown=1'; \ | |
| echo 'opcache.enable_cli=1'; \ | |
| } > /usr/local/etc/php/conf.d/opcache-recommended.ini | |
| # https://codex.wordpress.org/Editing_wp-config.php#Configure_Error_Logging | |
| RUN { \ | |
| echo 'error_reporting = 4339'; \ | |
| echo 'display_errors = Off'; \ | |
| echo 'display_startup_errors = Off'; \ | |
| echo 'log_errors = On'; \ | |
| echo 'error_log = /dev/stderr'; \ | |
| echo 'log_errors_max_len = 1024'; \ | |
| echo 'ignore_repeated_errors = On'; \ | |
| echo 'ignore_repeated_source = Off'; \ | |
| echo 'html_errors = Off'; \ | |
| } > /usr/local/etc/php/conf.d/error-logging.ini | |
| # Use the default production configuration | |
| RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | |
| RUN apt-get update; apt-get install -y unzip | |
| ENV ELFINDER_VERSION 2.1.50 | |
| RUN set -ex; \ | |
| curl -o elfinder.zip -fSL "https://github.com/Studio-42/elFinder/archive/${ELFINDER_VERSION}.zip"; \ | |
| # upstream tarballs include ./elFinder-${ELFINDER_VERSION}/ so this gives us /var/www/html/elFinder-${ELFINDER_VERSION}/ | |
| unzip elfinder.zip; \ | |
| mv /var/www/html/elFinder-${ELFINDER_VERSION}/* /var/www/html/; \ | |
| mv php/connector.minimal.php-dist php/connector.minimal.php; \ | |
| rm elfinder.zip; \ | |
| rm -rf /var/www/html/elFinder-${ELFINDER_VERSION}; \ | |
| chown -R www-data:www-data * && echo "DirectoryIndex elfinder.html" >> .htaccess | |
| VOLUME [ "/var/www/html/files" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get update | |
| sudo apt-get install --no-install-recommends apt-transport-https curl software-properties-common | |
| curl -fsSL 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e' | sudo apt-key add - | |
| sudo add-apt-repository "deb https://packages.docker.com/1.12/apt/repo/ ubuntu-$(lsb_release -cs) main" | |
| sudo apt-get update | |
| sudo apt-get -y install docker-engine | |
| sudo usermod -a -G docker $USER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| c.NotebookApp.ip = '0.0.0.0' | |
| c.NotebookApp.open_browser = False | |
| c.NotebookApp.allow_root = True | |
| c.NotebookApp.port = 8888 | |
| c.NotebookApp.password = u'sha1:c5bda82f3727:09fd0e485e4c795157a48a6c648e1dd3e9918c98' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.2' | |
| services: | |
| portainer: | |
| image: portainer/portainer | |
| ports: | |
| - "9000:9000" | |
| - "8000:8000" | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| - portainer_data:/data | |
| volumes: | |
| portainer_data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~/miniconda/bin/jupyter-notebook --config=~/jupyter_config.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment