Skip to content

Commit 8108235

Browse files
committed
add devcontainers
1 parent 76ad89c commit 8108235

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM debian:bookworm
2+
3+
RUN apt-get update \
4+
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y \
5+
"build-essential" "autoconf" "bison" "re2c" "pkg-config" "zlib1g-dev" "libsqlite3-dev" "libpq-dev" "locales" \
6+
"valgrind" "llvm" "clang" "git" "gdb" \
7+
&& locale-gen "en_US.UTF-8"
8+
9+
ENV LANGUAGE ""
10+
ENV LANG "en_US.UTF-8"
11+
ENV LC_ALL "C"
12+
ENV PDO_PGSQL_TEST_DSN "pgsql:host=pgsql port=5432 dbname=test user=test password=test"

.devcontainer/compose.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
services:
2+
shell:
3+
build:
4+
context: ./
5+
dockerfile: ./Dockerfile
6+
cap_add:
7+
- SYS_PTRACE
8+
security_opt:
9+
- seccomp:unconfined
10+
privileged: true
11+
tty: true
12+
depends_on:
13+
- pgsql
14+
pgsql:
15+
image: postgres
16+
environment:
17+
POSTGRES_DB: test
18+
POSTGRES_USER: test
19+
POSTGRES_PASSWORD: test

.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-dev (for CodeSpaces)",
3+
"customizations": {
4+
"vscode": {
5+
"extensions": [
6+
"ms-vscode.cpptools",
7+
"ms-vscode.cpptools-extension-pack",
8+
"maelvalais.autoconf",
9+
"ms-azuretools.vscode-docker"
10+
]
11+
}
12+
},
13+
"dockerComposeFile": "compose.yaml",
14+
"service": "shell"
15+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "php-dev (for Local)",
3+
"customizations": {
4+
"vscode": {
5+
"extensions": [
6+
"ms-vscode.cpptools",
7+
"ms-vscode.cpptools-extension-pack",
8+
"maelvalais.autoconf",
9+
"ms-azuretools.vscode-docker"
10+
]
11+
}
12+
},
13+
"dockerComposeFile": "./../compose.yaml",
14+
"service": "shell",
15+
"mounts": [
16+
{"type": "bind", "source": "./../", "target": "/work"}
17+
],
18+
"workspaceFolder": "/work"
19+
}

0 commit comments

Comments
 (0)