aboutsummaryrefslogtreecommitdiffstats
path: root/.devcontainer/Dockerfile
blob: b674943a587392399cfede7a62ba084782af76d4 (plain)
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
FROM ubuntu:jammy

ARG DEBIAN_FRONTEND=noninteractive

# PHP
RUN apt-get update -y && \
    apt install -y apache2 vim software-properties-common sudo nano

RUN apt-get install --no-install-recommends -y \
    php8.1 \
    php8.1-common \
    php8.1-gd \
    php8.1-zip \
    php8.1-curl \
    php8.1-xml \
    php8.1-xmlrpc \
    php8.1-mbstring \
    php8.1-sqlite \
    php8.1-xdebug \
    php8.1-pgsql \
    php8.1-intl \
    php8.1-imagick \
    php8.1-gmp \
    php8.1-apcu \
    php8.1-bcmath \
    php8.1-redis \
    php8.1-soap \
    php8.1-imap \
    php8.1-opcache \
    php8.1-cli \
    php8.1-dev \
    libmagickcore-6.q16-3-extra \
    curl \
    lsof \
    make \
    nodejs \
    npm

RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini && \
    echo "xdebug.remote_autostart = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini

# Autostart XDebug for apache
RUN { \
	echo "xdebug.mode=debug"; \
	echo "xdebug.start_with_request=yes"; \
} >> /etc/php/8.1/apache2/conf.d/20-xdebug.ini

# Docker
RUN apt-get -y install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common && \
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \    
    add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable" && \
    apt-get update -y && \
    apt-get install -y docker-ce docker-ce-cli containerd.io && \
    ln -s /var/run/docker-host.sock /var/run/docker.sock

WORKDIR /var/www/html