diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 39c414b..de8ea1b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,20 +1,32 @@ -FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04 +FROM mcr.microsoft.com/devcontainers/base:debian -# SHELL ["/bin/bash", "-c"] - -RUN apt-get update && apt-get -y install curl git libgtk-3.0 libnss3 libdrm-dev libgbm-dev libasound2 sqlite3 mysql-client +SHELL ["/bin/bash", "-c"] USER vscode +RUN sudo apt update && sudo apt install -y \ + libgtk-3-dev \ + libnotify-dev \ + libgconf-2-4 \ + libnss3 \ + libxss1 \ + libasound2 \ + chromium + +# Progate CLI +RUN curl -sSfL https://assets.path.progate.com/cli-installer/out/setup.sh | bash -s -- -y + +# nodenv RUN git clone https://github.com/nodenv/nodenv.git ~/.nodenv RUN echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> ~/.bashrc RUN echo 'eval "$(nodenv init -)"' >> ~/.bashrc - RUN mkdir -p "$HOME/.nodenv"/plugins RUN git clone https://github.com/nodenv/node-build.git "$HOME/.nodenv"/plugins/node-build - # Arielのnodeバージョンと揃える +# Ariel の node バージョンと揃える RUN $HOME/.nodenv/bin/nodenv install 22.12.0 RUN $HOME/.nodenv/bin/nodenv global 22.12.0 -RUN curl -sSfL https://assets.path.progate.com/cli-installer/out/setup.sh | bash -s -- -y +# Puppeteer の設定 +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true +ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e6bb749..58f2fe6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,15 +1,17 @@ { - "name": "express-generated-devcontainer", + "name": "progate-path-dev-container", "build": { "dockerfile": "Dockerfile" }, "runArgs": ["--init", "--privileged"], "workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/environment,type=bind,consistency=cached", "workspaceFolder": "/home/vscode", "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2.9.0": {}, + "ghcr.io/devcontainers/features/aws-cli:1": {}, + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + "ghcr.io/devcontainers/features/git:1": {}, "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/sshd:1": { - "version": "latest" - } + "ghcr.io/devcontainers/features/sshd:1": {}, + "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {}, + "ghcr.io/warrenbuckley/codespace-features/sqlite:1": {} }, "forwardPorts": [3000, 8000], // Configure tool-specific properties. diff --git a/.devcontainer/postAttachCommand.sh b/.devcontainer/postAttachCommand.sh index 038c160..137d920 100644 --- a/.devcontainer/postAttachCommand.sh +++ b/.devcontainer/postAttachCommand.sh @@ -1,4 +1,8 @@ #!/bin/bash -gh codespace ports visibility 3000:public -c $CODESPACE_NAME -gh codespace ports visibility 8000:public -c $CODESPACE_NAME +if [ -n "$CODESPACES" ]; then + gh codespace ports visibility 3000:public -c $CODESPACE_NAME + gh codespace ports visibility 8000:public -c $CODESPACE_NAME +fi + +docker compose -f $HOME/environment/docker-compose.yml up -d diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index c7de6b5..a1aafbe 100644 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -1,4 +1,3 @@ #!/bin/bash sudo git config --system core.editor 'code --wait' -cd ./environment && docker-compose up -d