runtime/Dockerfile

134 lines
3.8 KiB
Docker
Raw Normal View History

FROM debian:11
2020-02-02 21:06:11 +00:00
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
2020-03-31 19:54:28 +00:00
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget gpg
RUN echo "deb http://deb.debian.org/debian/ bullseye main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://security.debian.org/debian-security bullseye-security main" >> /etc/apt/sources.list && \
echo "deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list
2020-03-31 19:54:28 +00:00
RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales libffi-dev \
2020-02-02 21:06:11 +00:00
libssl-dev default-libmysqlclient-dev ca-certificates libpq-dev libjpeg62 libjpeg-dev \
libpng-dev libpng-dev build-essential git mercurial build-essential \
libbz2-dev libsqlite3-dev libreadline-dev zlib1g-dev libncurses5-dev \
libgdbm-dev libgd-dev cron git subversion vim nano mc htop procps \
dropbear gettext wget redis-server memcached supervisor curl ssh \
mariadb-client postgresql-client-13 postgresql-13-postgis-3-scripts bind9-host dnsutils nginx \
2020-02-02 21:06:11 +00:00
libxml2-dev libxslt1-dev openssh-sftp-server links2 lynx \
imagemagick libmagick++-6.q16-dev libmagick++-6.q16hdri-dev libmagickwand-dev ncdu libsodium-dev \
python3 python3-pip python3-virtualenv \
2020-02-02 21:06:11 +00:00
libcurl4-openssl-dev python-dev libproj-dev gdal-bin libmemcached-dev swig mutt \
ffmpeg libyaml-dev libc-client2007e-dev libonig-dev libkrb5-dev dialog \
whiptail tmux rsync nmap libzip-dev libfreetype6-dev \
2021-04-05 23:49:26 +00:00
jpegoptim optipng pngquant gifsicle webp libvpx-dev libwebp-dev # User requirement (svgo not available)
2020-02-02 21:06:11 +00:00
WORKDIR /srv
RUN useradd -d /srv app -s /bin/bash
RUN usermod -G crontab -a app
RUN rm /etc/localtime
RUN ln -s /usr/share/zoneinfo/Europe/Prague /etc/localtime
ADD /etc/locale.gen /etc/
RUN locale-gen
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV TERM xterm
#############
# Techs
#############
## Node.js
WORKDIR /usr/src
ADD build_node.sh /usr/local/bin/build_node.sh
# 2021/11
RUN build_node.sh 14.18.1
RUN build_node.sh 15.14.0
RUN build_node.sh 16.13.0
RUN build_node.sh 17.1.0
2020-02-02 21:06:11 +00:00
## Python
WORKDIR /usr/src
ADD build_python.sh /usr/local/bin/build_python.sh
2021-09-21 19:54:09 +00:00
# 2020/09
RUN build_python.sh 3.9.7
# 2021/11
RUN build_python.sh 3.10.0
2020-02-02 21:06:11 +00:00
## PHP
WORKDIR /usr/src
ADD build_php.sh /usr/local/bin/build_php.sh
2021-09-21 19:54:09 +00:00
# 2021/09
RUN build_php.sh 7.4.23
# 2021/11
RUN build_php.sh 7.4.26
2020-02-02 21:06:11 +00:00
2021-03-05 23:39:20 +00:00
## PHP 8
2021-03-07 23:27:45 +00:00
ADD build_php8.sh /usr/local/bin/build_php8.sh
# 2021/11
RUN build_php8.sh 8.0.13
2021-03-05 23:39:20 +00:00
## Ruby
WORKDIR /usr/src
ADD build_ruby.sh /usr/local/bin/build_ruby.sh
2021-09-21 19:54:09 +00:00
# 2020/09
RUN build_ruby.sh 2.7.4
RUN build_ruby.sh 3.0.2
2020-02-02 21:06:11 +00:00
## Deno
ADD build_deno.sh /usr/local/bin/build_deno.sh
# 2021/11
RUN build_deno.sh 1.16.2
2020-02-02 21:06:11 +00:00
#############
## Support tools and miscellaneous stuff
RUN rm -f /etc/cron.d/* /etc/cron.daily/* /etc/cron.hourly/* /etc/cron.monthly/* /etc/cron.weekly/*
ADD /scripts/enable_redis.sh /usr/local/bin/enable-redis
ADD /scripts/enable_memcached.sh /usr/local/bin/enable-memcached
RUN chmod 755 /usr/local/bin/*
ADD /etc/supervisord.conf /etc/supervisor/supervisord.conf
ADD /examples /opt/examples
ADD /etc/bashrc_local /opt/etc/bashrc_local
ADD /etc/bash_profile /opt/etc/bash_profile
ADD /etc/vimrc /opt/etc/vimrc
RUN mkdir -p /opt/etc/bashrc
RUN mkdir -p /opt/etc/appinit
ADD /etc/bashrc/common.sh /opt/etc/bashrc/
ADD /etc/nginx.conf /etc/nginx/nginx.conf
RUN rmdir /var/lib/nginx
RUN ln -s /srv/var/nginx /var/lib/nginx
RUN chown app:app /var/log/nginx -R
RUN chown app:app /home -R
# Start script
ADD /start.sh /start.sh
RUN chmod 755 /start.sh
## Roští script
RUN apt-get install -y fish
ADD ./gen_rosti.fish /usr/local/bin/
ADD ./rosti.sh.tmp /usr/src/
ADD ./Dockerfile /usr/src/
RUN cd /usr/src && /usr/local/bin/gen_rosti.fish > /usr/local/bin/rosti && chmod 755 /usr/local/bin/rosti
2020-02-02 21:06:11 +00:00
## Cleaning
RUN apt-get clean && rm -rf /usr/src/*
VOLUME /srv
WORKDIR /srv
EXPOSE 8000 22
ENTRYPOINT ["/start.sh"]