chore: redo container publishing, port dev-container to bazel

This commit is contained in:
41666 2020-10-07 02:02:42 -04:00
parent 101c476739
commit b834066479
14 changed files with 129 additions and 603 deletions

View file

@ -1,10 +0,0 @@
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
container_push(
name = "publish-dev-container",
format = "Docker",
image = "@dev-container//image:dockerfile_image.tar",
registry = "docker.pkg.github.com",
repository = "roleypoly/roleypoly/dev-container",
tag = "{STABLE_GIT_BRANCH}",
)

View file

@ -1,14 +0,0 @@
FROM mcr.microsoft.com/vscode/devcontainers/go:1.15
# Install Bazel
ARG BAZEL_VERSION=3.5.0
ARG BAZEL_DOWNLOAD_SHA=dev-mode
RUN curl -fSsL -o /tmp/bazel-installer.sh https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh \
&& ([ "${BAZEL_DOWNLOAD_SHA}" = "dev-mode" ] || echo "${BAZEL_DOWNLOAD_SHA} */tmp/bazel-installer.sh" | sha256sum --check - ) \
&& /bin/bash /tmp/bazel-installer.sh --base=/usr/local/bazel \
&& rm /tmp/bazel-installer.sh
# Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

View file

@ -1,16 +1,9 @@
{
"name": "Roleypoly (Bazel, Go, Node)",
"build": {
"dockerfile": "Dockerfile",
"args": {
"BAZEL_VERSION": "3.5.0",
}
},
// Set *default* container specific settings.json values on container create.
"image": "roleypoly/dev-container:main",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bazelbuild.vscode-bazel",
"dbaeumer.vscode-eslint",
@ -23,12 +16,4 @@
"eg2.vscode-npm-script",
"christian-kohler.npm-intellisense"
]
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}