mirror of
https://github.com/cloudmaker97/JTL-Shop-Entwicklungsumgebung.git
synced 2025-12-06 00:48:34 +00:00
DevContainer für Codespaces erstellt
This commit is contained in:
parent
a0d2c2c3a6
commit
e52f65d0df
2 changed files with 72 additions and 0 deletions
43
.devcontainer/Dockerfile
Normal file
43
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
FROM debian:bookworm
|
||||||
|
|
||||||
|
# Update package repositories and install required packages
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
sudo \
|
||||||
|
php \
|
||||||
|
php-cli \
|
||||||
|
php-mbstring \
|
||||||
|
php-xml \
|
||||||
|
unzip \
|
||||||
|
docker.io
|
||||||
|
|
||||||
|
# Set the working directory
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
# Install Composer
|
||||||
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||||
|
&& php composer-setup.php --install-dir=/bin --filename=composer \
|
||||||
|
&& php -r "unlink('composer-setup.php');"
|
||||||
|
|
||||||
|
# Install `ddev` for local development
|
||||||
|
RUN wget -O ./ddev.deb https://github.com/ddev/ddev/releases/download/v1.23.0-alpha1/ddev_1.23.0-alpha1_linux_amd64.deb
|
||||||
|
RUN apt-get install ./ddev.deb -y && rm ./ddev.deb
|
||||||
|
|
||||||
|
# Install the `just` command runner
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /bin
|
||||||
|
|
||||||
|
# Install `node` and `npm`
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
|
# Create an developer user with passwordless sudo
|
||||||
|
RUN useradd -m -s /bin/bash developer && \
|
||||||
|
echo 'developer:developer' | chpasswd
|
||||||
|
RUN chown -R developer:developer /workspace
|
||||||
|
RUN usermod -aG sudo developer
|
||||||
|
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
USER developer
|
||||||
|
|
||||||
|
CMD [ "bash" ]
|
||||||
29
.devcontainer/settings.json
Normal file
29
.devcontainer/settings.json
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"name": "JTL Entwicklungsumgebung",
|
||||||
|
"dockerFile": "Dockerfile",
|
||||||
|
"workspaceMount": "source=${localWorkspaceFolder}/.,target=/workspace,type=bind,consistency=cached",
|
||||||
|
"workspaceFolder": "/workspace",
|
||||||
|
"mounts": [
|
||||||
|
"source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached"
|
||||||
|
],
|
||||||
|
"runArgs": ["--privileged"],
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/github-cli:1": {
|
||||||
|
"version": "latest"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers/features/docker-in-docker:2": {
|
||||||
|
"moby": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"ms-azuretools.vscode-docker",
|
||||||
|
"kokakiwi.vscode-just",
|
||||||
|
"bmewburn.vscode-intelephense-client",
|
||||||
|
"DEVSENSE.composer-php-vscode",
|
||||||
|
"DEVSENSE.phptools-vscode"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue