Skip to content

Commit

Permalink
node: devcontainer support
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Jul 24, 2024
1 parent 450b41c commit 81d1db5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Guardian Development",
"build": {
"context": "..",
"dockerfile": "../node/Dockerfile",
"target": "dev"
},
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"ms-azuretools.vscode-docker",
"ms-vscode.makefile-tools"
],
"settings": {
"files.insertFinalNewline": true
}
}
},
}
4 changes: 3 additions & 1 deletion node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM --platform=linux/amd64 docker.io/golang:1.21.9-bullseye@sha256:311468bffa9fa4747a334b94e6ce3681b564126d653675a6adc46698b2b88d35 AS build
FROM --platform=linux/amd64 docker.io/golang:1.21.9-bullseye@sha256:311468bffa9fa4747a334b94e6ce3681b564126d653675a6adc46698b2b88d35 AS dev
# libwasmvm.so is not compatible with arm

FROM dev AS build

WORKDIR /app

COPY node/tools tools
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-docker-pin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# - We ignore cosmwasm_artifacts AS artifacts because it's a local reference only, is built in tilt
# - We ignore base AS (ignite-go-build|ignite-vue-build) because the base image is already pinned in wormchain/Dockerfile.proto
#
git ls-files -z | grep -z "Dockerfile*" | xargs -r -0 grep -s "FROM" | egrep -v 'sha256|scratch|solana|aptos|sui|base|cosmwasm_artifacts|cli-gen|const-gen AS (application|base|builder|ci_tests|tests|artifacts|ignite-go-build|ignite-vue-build|cli-export|const-export)'
git ls-files -z | grep -z "Dockerfile*" | xargs -r -0 grep -s "FROM" | egrep -v 'sha256|scratch|solana|aptos|sui|base|cosmwasm_artifacts|cli-gen|const-gen|dev AS (application|base|builder|ci_tests|tests|artifacts|ignite-go-build|ignite-vue-build|cli-export|const-export|build)'
if [ $? -eq 0 ]; then
echo "[!] Unpinned docker files" >&2
exit 1
Expand Down

0 comments on commit 81d1db5

Please sign in to comment.