From 5d128ecad724d803557e2f0428aceb0b1c94d7b9 Mon Sep 17 00:00:00 2001 From: Alexander Gabriel Date: Tue, 2 Jun 2026 14:32:24 +0000 Subject: [PATCH] updated devcontainer --- .devcontainer/devcontainer.json | 2 +- .devcontainer/postCreateCommand.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/postCreateCommand.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 62f99af..068a526 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "Debian", "image": "mcr.microsoft.com/devcontainers/base:trixie", - "postCreateCommand": "sudo apt update && sudo apt -y install plantuml php php-cli php-zip php-sqlite3 php-xml php-pgsql php-bcmath php-intl php-mbstring composer npm sqlite3 && composer install && npm install", + "postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100644 index 0000000..6d58d83 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ "$(whoami)" != "root" ]; then + SUDO=sudo +fi + +${SUDO} apt-get update +${SUDO} apt-get -y install lsb-release ca-certificates curl +${SUDO} curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb +${SUDO} dpkg -i /tmp/debsuryorg-archive-keyring.deb +${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +${SUDO} apt-get update + +${SUDO} apt-get -y install plantuml php8.5 php8.5-{cli,zip,sqlite3,xml,pgsql,bcmath,intl,mbstring} composer npm sqlite3 +composer install +npm install \ No newline at end of file