-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (25 loc) · 932 Bytes
/
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
# We initialize our image with Alpine linux
FROM alpine
# We install the necessary and some optional system dependencies
RUN apk --update add wget \
curl \
php8 \
php8-phar \
php8-mbstring \
php8-openssl \
php8-curl \
php8-dom \
php8-tokenizer \
php8-xml \
php8-xmlwriter
# PHP binary is being installed as php8, so we provide a convenient link
RUN ln -s /usr/bin/php8 /usr/bin/php
# Here we install the Composer package manager
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
# We make sure there is a /var/www directory and copy the current project there.
RUN mkdir -p /var/www
WORKDIR /var/www
COPY . /var/www
VOLUME /var/www
RUN composer install
CMD ["/bin/sh"]