-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
70 lines (58 loc) · 1.7 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM ubuntu:22.04
# Require timezone build argument, but keep it configurable.
ARG TIMEZONE=Europe/Vienna
# Define apt to not ask questions
ENV DEBIAN_FRONTEND=noninteractive
# install PHP & mysql
RUN set -xe; \
apt-get update -qq -y --fix-missing; \
# install PHP and its modules
apt-get install -qq -y --no-install-recommends \
vim \
nano \
# Install just the CLI version.
php-cli \
php-mbstring \
# --- PHP modules BEGIN ---
php-bcmath \
php-curl \
php-gd \
php-imagick \
php-intl \
php-mysql \
php-opcache \
php-readline \
php-soap \
php-xdebug \
php-yaml \
php-zip \
php-xml \
# --- PHP modules END ---
mysql-server; \
# stop the mysql service after installation
service mysql stop; \
usermod -d /var/lib/mysql/ mysql;
# Allow to run composer as root
ENV COMPOSER_ALLOW_SUPERUSER="1"
# copy composer binary
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
# install composer
RUN set -xe; \
# Install git & unzip
apt-get install -qq -y --no-install-recommends git unzip;
# Prepare working directory
RUN set -xe; \
mkdir -p /app; \
chmod g+w,o+w /app;
# Set the working directory inside the container
WORKDIR /app
# Copy the cake2 app template code to the working directory
COPY . .
# remove superfluous files & install composer dependencies
RUN set -xe; \
rm -Rf .editorconfig .github .gitignore CHANGELOG.md Dockerfile README.md; \
composer install --no-interaction
# run before and after command scripts
ENTRYPOINT ["/app/entrypoint.sh"]
# default command: start a shell
CMD ["/bin/bash", "-l"]