File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:labs
2+ FROM mcr.microsoft.com/devcontainers/base:debian
3+
4+ RUN <<-SCRIPT
5+ set -o errexit
6+ rm -Rf ~/.oh-my-zsh
7+
8+ apt update
9+ apt full-upgrade -qy
10+ apt install -qy \
11+ bash \
12+ curl \
13+ git \
14+ nano \
15+ protobuf-compiler \
16+ python3 \
17+ tmux \
18+ vim \
19+ zplug \
20+ zsh
21+ chsh -s "$(command -v zsh)"
22+
23+ # Set up ohmyzsh and change the shell to zsh
24+ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
25+ SCRIPT
26+
27+ SHELL ["/usr/bin/env" , "zsh" , "-c" ]
28+
29+ # Configure sdkman.
30+ RUN <<-SCRIPT
31+ set -o errexit
32+ curl -s "https://get.sdkman.io" | bash
33+
34+ set +o errexit
35+ source /root/.sdkman/bin/sdkman-init.sh
36+ set -o errexit
37+
38+ # Install java tooling we need
39+ sdk install java
40+ sdk install maven
41+ sdk install mvnd
42+ SCRIPT
Original file line number Diff line number Diff line change 11{
2- "image" : " mcr.microsoft.com/devcontainers/java:dev-21" ,
3- "features" : {
4- "ghcr.io/devcontainers/features/common-utils:2" : {},
5- "ghcr.io/devcontainers-contrib/features/protoc:1" : {
6- "version" : " latest"
7- }
2+ "build" : {
3+ "dockerfile" : " Dockerfile"
84 }
95}
Original file line number Diff line number Diff line change 1+ name : Build Devcontainer
2+ on :
3+ pull_request :
4+ paths :
5+ - .devcontainer/**
6+ - .github/workflows/devcontainer.yml
7+
8+ workflow_call : {}
9+ workflow_dispatch : {}
10+
11+ jobs :
12+ build :
13+ name : Build Devcontainer
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Build Devcontainer
21+ run : |-
22+ set -o errexit
23+ set -o nounset
24+ set -o xtrace
25+
26+ # Verify docker is up first.
27+ docker run --rm hello-world
28+
29+ # Verify the devcontainer builds correctly.
30+ npm install -g @devcontainers/cli
31+ devcontainer build \
32+ --workspace-folder . \
33+ --push false \
34+ --image-name ghcr.io/ascopes/protobuf-maven-plugin/devcontainer:latest
Original file line number Diff line number Diff line change 66# ##
77set -o errexit
88set -o nounset
9- [[ -n ${ DEBUG+undef} ]] && set -o xtrace
9+ [[ -v DEBUG ]] && set -o xtrace
1010
1111function usage() {
1212 echo " USAGE: ${BASH_SOURCE[0]} [ -h | -m | -M ]"
Original file line number Diff line number Diff line change 88# ##
99set -o errexit
1010set -o nounset
11- [[ -n ${ DEBUG+defined} ]] && set -o xtrace
11+ [[ -v DEBUG ]] && set -o xtrace
1212
1313cd " $( dirname " ${BASH_SOURCE[0]} " ) /.."
1414echo " Checking protobuf version from pom.xml..."
@@ -52,7 +52,6 @@ readonly target=${target_dir}/protoc
5252echo " ${target_dir} " >> " ${GITHUB_PATH} "
5353export PATH=" ${PATH} :${target_dir} "
5454
55-
5655echo " Downloading protoc ${version} for OS ${os_name} and CPU ${os_arch} "
5756echo " Installing ${url} to ${target} "
5857
Original file line number Diff line number Diff line change 55# ## Author: Ashley Scopes
66# ##
77set -o errexit
8+ set -o nounset
89set -o pipefail
9- [[ -n ${ DEBUG+undef} ]] && set -o xtrace
10+ [[ -v DEBUG ]] && set -o xtrace
1011
1112readonly host=127.0.0.1
1213readonly port=9000
You can’t perform that action at this time.
0 commit comments