add devcontainer

This commit is contained in:
Ryan Cavicchioni 2025-03-24 11:17:05 -05:00
parent 8acc46c08d
commit a580e78d81
Signed by: ryanc
SSH Key Fingerprint: SHA256:FEbwJ3JyWHwYNAM8BqctZ/LmHHg1bzfi/huOj7FxlXU
6 changed files with 37 additions and 24 deletions

5
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
ARG VARIANT="3.4.2"
FROM ghcr.io/rails/devcontainer/images/ruby:${VARIANT}
RUN mkdir /run/kubernaut && \
chown vscode: /run/kubernaut

4
.devcontainer/boot.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
bundle update --bundler
bundler install

11
.devcontainer/compose.yml Normal file
View File

@ -0,0 +1,11 @@
---
services:
kubernaut:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspace:cached
command: sleep infinity
memcached:
image: memcached:latest

View File

@ -0,0 +1,17 @@
{
"dockerComposeFile": "compose.yml",
"service": "kubernaut",
"workspaceFolder": "/workspace",
"customizations": {
"vscode": {
"extensions": [
"Shopify.ruby-lsp",
"ms-azuretools.vscode-docker"
]
}
},
"postCreateCommand": ".devcontainer/boot.sh",
"forwardPorts": [
4567
]
}

View File

@ -23,15 +23,6 @@ RUN <<EOT
bundle install
EOT
FROM build AS dev
WORKDIR /app
RUN <<EOT
bundle install
EOT
CMD [ "sleep", "infinity" ]
FROM base

View File

@ -1,15 +0,0 @@
services:
web:
build:
context: .
target: dev
ports:
- "4567:4567"
volumes:
- .:/app
environment:
{}
# WEB_CONCURRENCY: 3
command:
- sleep
- infinity