Created
July 23, 2020 17:47
-
-
Save ronaldmiranda/b12802c6a3976282811fe76066bf0993 to your computer and use it in GitHub Desktop.
This file contains 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 debian:buster-slim | |
ENV DEBIAN_FRONTEND noninteractive | |
USER root | |
WORKDIR /opt/app/ | |
RUN apt-get update && apt-get -y install --no-install-recommends \ | |
lsb-release=10.2* \ | |
ca-certificates=20190110 \ | |
git=1:2* \ | |
openssh-server=1:7* \ | |
openssh-client=1:7* \ | |
python3-pkg-resources=40.8* \ | |
python3-pygments=2.3* \ | |
procps=2:3.* \ | |
gnupg2=2.2.* \ | |
wget=1.2* \ | |
sudo=1.8.* \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \ | |
&& echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list \ | |
&& apt-get update && apt-get install -y \ | |
php7.4 \ | |
php7.4-mysql \ | |
php7.4-gd \ | |
php7.4-curl \ | |
php7.4-apcu \ | |
php7.4-cli \ | |
php7.4-json \ | |
php7.4-mbstring \ | |
php7.4-fpm \ | |
php7.4-zip \ | |
php7.4-ldap \ | |
php7.4-memcached \ | |
php7.4-bz2 \ | |
php-pear \ | |
&& rm -rf /var/lib/apt/lists/* | |
## phabricator install | |
RUN git clone -b stable --depth=1 https://github.com/phacility/phabricator.git phabricator \ | |
&& git clone -b stable --depth=1 https://github.com/phacility/arcanist.git arcanist | |
## phabricator log directory | |
RUN mkdir -p /var/log/phd | |
## php config files | |
COPY ./rootfs/etc/php7/conf.d/custom.ini /etc/php/7.4/fpm/php.ini | |
## git setup | |
RUN ln -s /usr/lib/git-core/git-http-backend /usr/bin/ | |
RUN useradd git \ | |
&& usermod -p NP git \ | |
&& mkdir /home/git \ | |
&& echo "git ALL=(root) SETENV: NOPASSWD: /usr/bin/git-upload-pack, /usr/bin/git-receive-pack, /usr/bin/git-http-backend" >> /etc/sudoers | |
ENV PATH "$PATH:/opt/app/phabricator/bin" | |
CMD phd start && tail -f /var/log/phd/daemons.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment