add devcontainer
This commit is contained in:
parent
8acc46c08d
commit
a580e78d81
5
.devcontainer/Dockerfile
Normal file
5
.devcontainer/Dockerfile
Normal 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
4
.devcontainer/boot.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
bundle update --bundler
|
||||
bundler install
|
11
.devcontainer/compose.yml
Normal file
11
.devcontainer/compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
services:
|
||||
kubernaut:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ..:/workspace:cached
|
||||
command: sleep infinity
|
||||
memcached:
|
||||
image: memcached:latest
|
17
.devcontainer/devcontainer.json
Normal file
17
.devcontainer/devcontainer.json
Normal 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
|
||||
]
|
||||
}
|
@ -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
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
target: dev
|
||||
ports:
|
||||
- "4567:4567"
|
||||
volumes:
|
||||
- .:/app
|
||||
environment:
|
||||
{}
|
||||
# WEB_CONCURRENCY: 3
|
||||
command:
|
||||
- sleep
|
||||
- infinity
|
Loading…
x
Reference in New Issue
Block a user