INT 21h

Hi, I am Vladimir Smagin, SysAdmin and Kaptain. Telegram Email / GIT / RSS / GPG

Dockerfile for Nginx Unit projects

№ 10453 В разделе Sysadmin от December 16th, 2019,
В подшивках: ,

Place unit_config.json file in project root directory, it will be moved to /state during image building. Find example configs by hash tag #unit.

Do not forget to change timezone and packages to install.

FROM ubuntu:eoan

ENV TZ=Asia/Tomsk
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN set -xe \
    && apt-get -y update \
    && apt-get -y install --no-install-recommends gnupg2 curl php mysql-client ca-certificates \
    php-curl php-mysql \
    && curl | apt-key add - \
    && echo "deb eoan unit"  | tee -a /etc/apt/sources.list \
    && echo "deb-src eoan unit" | tee -a /etc/apt/sources.list \
    && apt-get -y update \
    && apt-get -y install unit unit-php unit-dev \
    && unitd --version

RUN rm /etc/init.d/unit

WORKDIR /www/app

COPY . .

RUN mkdir -p /state/certs && mv unit_config.json /state/conf.json \
    && chmod 700 -R /state && chown root:root -R /state
RUN chown -R www-data:www-data /www/app

CMD ["unitd", "--no-daemon", "--state", "/state"]

Нет комментариев »

Leave a Reply

Your email address will not be published. Required fields are marked *


Облачная платформа

Fortune cookie: Today's spam: Increase your girth.