Skip to content

Commit c2bc808

Browse files
committed
add .devcontainer
1 parent 2ba4939 commit c2bc808

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM ubuntu:20.04
2+
3+
RUN export DEBIAN_FRONTEND=noninteractive \
4+
&& apt update \
5+
&& apt install -y php7.4-cli php7.4-dev php7.4-mbstring php7.4-curl php7.4-intl git zip unzip libicu-dev
6+
7+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
8+
9+
RUN mkdir -p /xdebug && git clone https://github.com/xdebug/xdebug.git --recursive --branch 3.1.0 /xdebug
10+
RUN cd /xdebug \
11+
&& phpize \
12+
&& ./configure --enable-xdebug \
13+
&& make \
14+
&& make install \
15+
&& echo 'zend_extension=xdebug' > /etc/php/7.4/cli/conf.d/99-xdebug.ini
16+
17+
RUN php -v
18+
19+
CMD ["sleep", "infinity"]

.devcontainer/devcontainer.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "php-whois-dev",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "php-whois-dev",
5+
"workspaceFolder": "/opt/project",
6+
"shutdownAction": "stopCompose",
7+
"customizations": {
8+
"vscode": {
9+
"extensions": [
10+
"xdebug.php-debug",
11+
"xdebug.php-pack"
12+
]
13+
}
14+
}
15+
}

.devcontainer/docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: '3.9'
2+
3+
services:
4+
php-whois-dev:
5+
build: .
6+
volumes:
7+
- ../:/opt/project

0 commit comments

Comments
 (0)