Skip to content

Commit d5fcfa2

Browse files
committed
move remaining lines of base-app into base-php Dockerfile
Move the rest of the local base-app into the published base-php image
1 parent 69a155d commit d5fcfa2

2 files changed

Lines changed: 33 additions & 36 deletions

File tree

docker/app/Dockerfile

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -38,57 +38,24 @@ FROM ${ENVIRONMENT}-ui-builder AS ui-builder
3838
# artifacts built to /data/src/dist
3939
RUN npm run build:${NPM_BUILD_SUFFIX}
4040

41-
# APP-BASE
42-
FROM sillsdev/web-languageforge:base-php AS base-app
43-
44-
# install and configure LFMerge
45-
# LFMerge required apt packages
46-
# python - required by Mercurial (written in Python), which is bundled in the LFMerge apt package
47-
# lfmerge - main package, from SIL sources
48-
# rsyslog - lfmerge logs to rsyslog and expects this to exist
49-
# logrotate - TODO: is this required?
50-
# iputils-ping - Chorus (part of LFMerge) requires the "ping" command to be available on the command line
51-
RUN curl -L http://linux.lsdev.sil.org/downloads/sil-testing.gpg | apt-key add - \
52-
&& echo "deb http://linux.lsdev.sil.org/ubuntu bionic main" > /etc/apt/sources.list.d/linux-lsdev-sil-org.list \
53-
&& apt-get update \
54-
&& apt-get install --yes --no-install-recommends python lfmerge rsyslog logrotate iputils-ping \
55-
&& rm -rf /var/lib/apt/lists/*
56-
COPY docker/app/lfmerge.conf /etc/languageforge/conf/sendreceive.conf
57-
COPY docker/app/lfmergeqm-background.sh /
58-
RUN adduser www-data fieldworks \
59-
&& chown -R www-data:www-data /var/lib/languageforge \
60-
&& chmod 0755 /var/lib/languageforge \
61-
&& mkdir -m 02775 -p /var/www/.local \
62-
&& chown www-data:www-data /var/www/.local
63-
64-
# rsyslog customizations (imklog reads kernel messages, which isn't allowed or desired in Docker containers)
65-
RUN sed -i '/load="imklog"/s/^/#/' /etc/rsyslog.conf
66-
67-
# php customizations
68-
COPY docker/app/customizations.php.ini $PHP_INI_DIR/conf.d/
69-
70-
# apache2 customizations
71-
RUN a2enmod headers rewrite
72-
COPY docker/app/000-default.conf /etc/apache2/sites-enabled
73-
7441
# COMPOSER-BUILDER
7542
# download composer app dependencies
7643
# git - needed for composer install
77-
FROM base-app AS composer-builder
44+
FROM sillsdev/web-languageforge:base-php AS composer-builder
7845
WORKDIR /composer
7946
COPY src/composer.json src/composer.lock /composer/
8047
ENV COMPOSER_ALLOW_SUPERUSER=1
8148
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* \
8249
&& install-php-extensions @composer && composer install
8350

8451
# PRODUCTION IMAGE
85-
FROM base-app AS production-app
52+
FROM sillsdev/web-languageforge:base-php AS production-app
8653
RUN rm /usr/local/bin/install-php-extensions
8754
RUN apt-get remove -y gnupg2
8855
RUN mv $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
8956

9057
# DEVELOPMENT IMAGE
91-
FROM base-app AS development-app
58+
FROM sillsdev/web-languageforge:base-php AS development-app
9259
RUN install-php-extensions xdebug
9360
COPY docker/app/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d
9461
RUN mv $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini

docker/base-php/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,33 @@ RUN apt-get update && apt-get -y install p7zip-full unzip gnupg2 curl && rm -rf
1111
# PHP extensions required by the LF application
1212
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
1313
RUN install-php-extensions gd mongodb intl
14+
15+
# install and configure LFMerge
16+
# LFMerge required apt packages
17+
# python - required by Mercurial (written in Python), which is bundled in the LFMerge apt package
18+
# lfmerge - main package, from SIL sources
19+
# rsyslog - lfmerge logs to rsyslog and expects this to exist
20+
# logrotate - TODO: is this required?
21+
# iputils-ping - Chorus (part of LFMerge) requires the "ping" command to be available on the command line
22+
RUN curl -L http://linux.lsdev.sil.org/downloads/sil-testing.gpg | apt-key add - \
23+
&& echo "deb http://linux.lsdev.sil.org/ubuntu bionic main" > /etc/apt/sources.list.d/linux-lsdev-sil-org.list \
24+
&& apt-get update \
25+
&& apt-get install --yes --no-install-recommends python lfmerge rsyslog logrotate iputils-ping \
26+
&& rm -rf /var/lib/apt/lists/*
27+
COPY docker/app/lfmerge.conf /etc/languageforge/conf/sendreceive.conf
28+
COPY docker/app/lfmergeqm-background.sh /
29+
RUN adduser www-data fieldworks \
30+
&& chown -R www-data:www-data /var/lib/languageforge \
31+
&& chmod 0755 /var/lib/languageforge \
32+
&& mkdir -m 02775 -p /var/www/.local \
33+
&& chown www-data:www-data /var/www/.local
34+
35+
# rsyslog customizations (imklog reads kernel messages, which isn't allowed or desired in Docker containers)
36+
RUN sed -i '/load="imklog"/s/^/#/' /etc/rsyslog.conf
37+
38+
# php customizations
39+
COPY docker/app/customizations.php.ini $PHP_INI_DIR/conf.d/
40+
41+
# apache2 customizations
42+
RUN a2enmod headers rewrite
43+
COPY docker/app/000-default.conf /etc/apache2/sites-enabled

0 commit comments

Comments
 (0)