File tree Expand file tree Collapse file tree 6 files changed +23
-18
lines changed Expand file tree Collapse file tree 6 files changed +23
-18
lines changed Original file line number Diff line number Diff line change 19
19
20
20
- uses : docker/setup-buildx-action@v2
21
21
with :
22
- platforms : linux/amd64,linux/arm64
22
+ platforms : linux/amd64
23
23
24
24
- name : Log in to Docker Hub
25
25
uses : docker/login-action@v2
28
28
password : ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
29
29
30
30
- name : Build, tag and push image
31
- run : docker buildx build --push --platform linux/amd64,linux/arm64 -t ${{ env.IMAGE }} -f docker/base-php/Dockerfile .
31
+ run : docker buildx build --push --platform linux/amd64 -t ${{ env.IMAGE }} -f docker/base-php/Dockerfile .
Original file line number Diff line number Diff line change @@ -38,24 +38,22 @@ RUN npm run build:${NPM_BUILD_SUFFIX}
38
38
# COMPOSER-BUILDER
39
39
# download composer app dependencies
40
40
# git - needed for composer install
41
- FROM sillsdev/web-languageforge:base-php-7.4 AS composer-builder
41
+ FROM sillsdev/web-languageforge:base-php AS composer-builder
42
42
ENV COMPOSER_ALLOW_SUPERUSER=1
43
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* \
44
- && install-php-extensions @composer
45
43
WORKDIR /composer
46
44
COPY src/composer.json src/composer.lock /composer/
47
45
RUN composer install
48
46
49
47
# PRODUCTION IMAGE
50
- FROM sillsdev/web-languageforge:base-php-7.4 AS production-app
51
- RUN rm /usr/local/bin/install-php-extensions
52
- RUN apt-get remove -y gnupg2
48
+ FROM sillsdev/web-languageforge:base-php AS production-app
49
+ RUN rm /usr/local/bin/install-php-extensions /usr/local/bin/composer
50
+ RUN apt-get remove -y gnupg2 git
53
51
RUN mv $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
54
52
# had to add /wait into prod image so the prod image could be run through E2E tests.
55
53
COPY --from=sillsdev/web-languageforge:wait-latest /wait /wait
56
54
57
55
# DEVELOPMENT IMAGE
58
- FROM sillsdev/web-languageforge:base-php-7.4 AS development-app
56
+ FROM sillsdev/web-languageforge:base-php AS development-app
59
57
RUN install-php-extensions xdebug-^3.1
60
58
COPY docker/app/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d
61
59
RUN mv $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini
Original file line number Diff line number Diff line change 1
- FROM php:7.3.28-apache
1
+ # This image is based on debian 11 bullseye
2
+ # https://hub.docker.com/layers/library/php/7.4-apache/images/sha256-c44681664d111addef2a2b6598901609990d45047b874c87d7d40fc7ce269195
3
+ FROM php:7.4-apache
2
4
3
5
# install apt packages
6
+ # gnupg - for installing Mongo GPG key below
7
+ # git - for use by composer to install dependencies
4
8
# p7zip-full - used by LF application for unzipping lexicon uploads
5
9
# unzip - used by LF application for unzipping lexicon uploads
6
10
# curl - used by LF application
7
11
# ffmpeg - used by LF audio upload method
8
- RUN apt-get update && apt-get -y install p7zip-full unzip curl tini ffmpeg && rm -rf /var/lib/apt/lists/*
12
+ RUN apt-get update && apt-get -y install gnupg git p7zip-full unzip curl tini ffmpeg
13
+
14
+ # Install MongoDB shell and tools (must be done after gnupg is installed)
15
+ # mongodb-org-tools - contains mongoimport/mongoexport used by LF backup/restore project commands
16
+ # mongodb-mongosh - contains mongosh which is useful for querying the db from the app container
17
+ RUN curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor
18
+ RUN echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] http://repo.mongodb.org/apt/debian bullseye/mongodb-org/6.0 main" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list
19
+ RUN apt-get update && apt-get -y install mongodb-org-tools mongodb-mongosh && rm -rf /var/lib/apt/lists/*
9
20
10
21
# see https://github.com/mlocati/docker-php-extension-installer
11
22
# PHP extensions required by the LF application
12
23
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
13
- RUN install-php-extensions mongodb intl
24
+ RUN install-php-extensions mongodb intl @composer
14
25
15
26
# php customizations
16
27
COPY docker/base-php/customizations.php.ini $PHP_INI_DIR/conf.d/
Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ FROM sillsdev/web-languageforge:base-php
3
3
4
4
WORKDIR /work
5
5
ENV COMPOSER_ALLOW_SUPERUSER=1
6
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* \
7
- && install-php-extensions @composer
8
6
COPY src/composer.json src/composer.lock /work/
9
7
10
8
CMD ["bash" ]
Original file line number Diff line number Diff line change 1
- FROM sillsdev/web-languageforge:base-php-7.4
1
+ FROM sillsdev/web-languageforge:base-php
2
2
3
3
4
4
# ----- LINES BELOW COPIED FROM APP DOCKERFILE ----------
5
5
WORKDIR /var/www/html
6
6
ENV COMPOSER_ALLOW_SUPERUSER=1
7
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* \
8
- && install-php-extensions @composer
9
7
COPY src/composer.json src/composer.lock /var/www/html/
10
8
RUN composer install
11
9
12
- RUN install-php-extensions xdebug
10
+ RUN install-php-extensions xdebug-^3.1
13
11
COPY docker/app/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d
14
12
15
13
RUN mv $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini
You can’t perform that action at this time.
0 commit comments