diff --git a/images/base/Dockerfile b/images/base/Dockerfile index 64fa2d0..bb544d9 100644 --- a/images/base/Dockerfile +++ b/images/base/Dockerfile @@ -19,7 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -FROM ubuntu:jammy +FROM ubuntu:22.10 # Set the shell to Bash SHELL ["/bin/bash", "-c"] @@ -36,7 +36,7 @@ RUN apt update && \ apt upgrade -y && \ apt install -y sudo git curl neofetch git-lfs ca-certificates \ unzip zip bash vim nano python3 python3-pip libarchive-tools gnupg lsb-release pkg-config \ - libssl-dev + libssl-dev tree htop # Setup the user environment RUN groupadd -g ${USER_GID} ${USERNAME} && \ @@ -58,11 +58,13 @@ RUN apt update && apt install -y docker-ce docker-ce-cli containerd.io docker-co RUN usermod -aG docker ${USERNAME} # stuff here -ENV GITHUB_CLI_VERSION="2.23.0" -ENV CODER_CLI_VERSION="0.17.1" -ENV TERRAFORM_VERSION="1.3.8" -ENV KUBECTL_VERSION="1.26.1" -ENV HELM_VERSION="3.11.1" +ENV BAZEL_BUILDTOOLS_VERSION="6.0.1" +ENV GITHUB_CLI_VERSION="2.24.3" +ENV CODER_CLI_VERSION="0.19.2" +ENV TERRAFORM_VERSION="1.4.0" +ENV BAZELISK_VERSION="1.16.0" +ENV KUBECTL_VERSION="1.26.2" +ENV HELM_VERSION="3.11.2" # Get current architecture and download software here # also this looks like shit, i know! @@ -70,16 +72,24 @@ RUN set -eux; \ arch="$(dpkg --print-architecture)"; \ case "${arch}" in \ aarch64|arm64) \ + BAZEL_UNUSED_DEPS_DOWNLOAD_URL="https://github.com/bazelbuild/buildtools/releases/download/${BAZEL_BUILDTOOLS_VERSION}/unused_deps-linux-arm64"; \ + BAZEL_BUILDIFIER_DOWNLOAD_URL="https://github.com/bazelbuild/buildtools/releases/download/${BAZEL_BUILDTOOLS_VERSION}/buildifier-linux-arm64"; \ + BAZEL_BUILDOZER_DOWNLOAD_URL="https://github.com/bazelbuild/buildtools/releases/download/${BAZEL_BUILDTOOLS_VERSION}/buildifier-linux-arm64"; \ GITHUB_CLI_DOWNLOAD_URL="https://github.com/cli/cli/releases/download/v${GITHUB_CLI_VERSION}/gh_${GITHUB_CLI_VERSION}_linux_arm64.tar.gz"; \ TERRAFORM_DOWNLOAD_URL="https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_arm64.zip"; \ - CODER_DOWNLOAD_URL="https://github.com/coder/coder/releases/download/v${CODER_CLI_VERSION}/coder_${CODER_CLI_VERSION}_linux_arm64.tar.gz"; \ + BAZELISK_DOWNLOAD_URL="https://github.com/bazelbuild/bazelisk/releases/download/v${BAZELISK_VERSION}/bazelisk-linux-arm64"; \ KUBECTL_DOWNLOAD_URL="https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/arm64/kubectl"; \ + CODER_DOWNLOAD_URL="https://github.com/coder/coder/releases/download/v${CODER_CLI_VERSION}/coder_${CODER_CLI_VERSION}_linux_arm64.tar.gz"; \ HELM_DOWNLOAD_URL="https://get.helm.sh/helm-v${HELM_VERSION}-linux-arm64.tar.gz"; \ ;; \ amd64|x86_64) \ + BAZEL_UNUSED_DEPS_DOWNLOAD_URL="https://github.com/bazelbuild/buildtools/releases/download/${BAZEL_BUILDTOOLS_VERSION}/unused_deps-linux-amd64"; \ + BAZEL_BUILDIFIER_DOWNLOAD_URL="https://github.com/bazelbuild/buildtools/releases/download/${BAZEL_BUILDTOOLS_VERSION}/buildifier-linux-amd64"; \ + BAZEL_BUILDOZER_DOWNLOAD_URL="https://github.com/bazelbuild/buildtools/releases/download/${BAZEL_BUILDTOOLS_VERSION}/buildifier-linux-amd64"; \ GITHUB_CLI_DOWNLOAD_URL="https://github.com/cli/cli/releases/download/v${GITHUB_CLI_VERSION}/gh_${GITHUB_CLI_VERSION}_linux_amd64.tar.gz" \ - CODER_DOWNLOAD_URL="https://github.com/coder/coder/releases/download/v${CODER_CLI_VERSION}/coder_${CODER_CLI_VERSION}_linux_amd64.tar.gz" \ TERRAFORM_DOWNLOAD_URL="https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" \ + BAZELISK_DOWNLOAD_URL="https://github.com/bazelbuild/bazelisk/releases/download/v${BAZELISK_VERSION}/bazelisk-linux-amd64"; \ + CODER_DOWNLOAD_URL="https://github.com/coder/coder/releases/download/v${CODER_CLI_VERSION}/coder_${CODER_CLI_VERSION}_linux_amd64.tar.gz" \ KUBECTL_DOWNLOAD_URL="https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl"; \ HELM_DOWNLOAD_URL="https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz"; \ ;; \ @@ -89,17 +99,20 @@ RUN set -eux; \ curl -L ${CODER_DOWNLOAD_URL} | tar xfz - -C /opt/coder/cli --strip-components=1; \ curl -L ${GITHUB_CLI_DOWNLOAD_URL} | tar xfz - -C /opt/github/cli --strip-components=1; \ curl -L ${HELM_DOWNLOAD_URL} | tar xfz - -C /opt/helm --strip-components=1; \ - curl -L ${TERRAFORM_DOWNLOAD_URL} | bsdtar xfz - --strip-components=1 -C /opt/hashicorp/terraform; + curl -L ${TERRAFORM_DOWNLOAD_URL} | bsdtar xfz - --strip-components=1 -C /opt/hashicorp/terraform; \ + curl -fsSL -o /usr/local/bin/bazel ${BAZELISK_DOWNLOAD_URL}; \ + curl -fsSL -o /usr/local/bin/bazel-buildifier ${BAZEL_BUILDIFIER_DOWNLOAD_URL}; \ + curl -fsSL -o /usr/local/bin/bazel-buildozer ${BAZEL_BUILDOZER_DOWNLOAD_URL}; \ + curl -fsSL -o /usr/local/bin/bazel-unused-deps ${BAZEL_UNUSED_DEPS_DOWNLOAD_URL}; -# Let the user execute `kubectl` -RUN chmod +x /usr/local/bin/kubectl +# Let the user execute `kubectl` and `bazel` (which is just Bazelisk so we don't have to have a Java environment in this image) +RUN chmod +x /usr/local/bin/kubectl /usr/local/bin/bazel /usr/local/bin/bazel-* # Set back to our user! USER ${USERNAME} WORKDIR /home/${USERNAME} ENV PATH=$PATH:/opt/coder/cli:/opt/hashicorp/terraform:/opt/helm:/opt/github/cli/bin:/home/${USERNAME}/.local/bin -ENV LANG=en-GB.UTF-8 # Add common Helm repositores RUN helm repo add bitnami https://charts.bitnami.com/bitnami diff --git a/images/base/README.md b/images/base/README.md index 15cd6e8..bed3604 100644 --- a/images/base/README.md +++ b/images/base/README.md @@ -2,19 +2,25 @@ This image is the main base for all of the images in this repository. ## Bundled Software -| Name | Description | Version | -| ----------- | --------------------------------------------------------------------------------- | --------------------- | -| GitHub CLI | GitHub's official command line utility | [v2.23.0][github-cli] | -| Coder (OSS) | Remote development environments on your infrastructure provisioned with Terraform | [v0.17.1][coder] | -| Terraform | Automate Infrastructure on Any Cloud | [v1.3.8][terraform] | -| `kubectl` | kubectl controls the Kubernetes cluster manager. | [v1.26.1][kubectl] | -| `helm` | The Kubernetes Package Manager | [v3.11.1][helm] | +| Name | Description | Version | +| ---------------- | --------------------------------------------------------------------------------- | -------------------------- | +| Bazel Buildtools | A bazel BUILD file formatter and editor | [v6.0.1][bazel-buildtools] | +| GitHub CLI | GitHub's official command line utility | [v2.24.3][github-cli] | +| Coder (OSS) | Remote development environments on your infrastructure provisioned with Terraform | [v0.19.2][coder] | +| Terraform | Automate Infrastructure on Any Cloud | [v1.4.0][terraform] | +| Bazelisk | A user-friendly launcher for Bazel. | [v1.16.0][bazelisk] | +| `kubectl` | kubectl controls the Kubernetes cluster manager. | [v1.26.2][kubectl] | +| `bazel` | a fast, scalable, multi-language and extensible build system | [v6.1.0][bazel] | +| `helm` | The Kubernetes Package Manager | [v3.11.2][helm] | -[github-cli]: https://github.com/cli/cli/releases/tag/v2.23.0 -[terraform]: https://github.com/hashicorp/terraform/releases/tag/v1.3.8 -[kubectl]: https://github.com/kubernetes/kubernetes/releases/tag/v1.26.1 -[coder]: https://github.com/coder/coder/releases/tag/v0.17.1 -[helm]: https://github.com/helm/helm/releases/tag/v3.11.1 +[bazel-buildtools]: https://github.com/bazelbuild/buildtools/releases/tag/6.0.1 +[github-cli]: https://github.com/cli/cli/releases/tag/v2.24.3 +[terraform]: https://github.com/hashicorp/terraform/releases/tag/v1.4.0 +[bazelisk]: https://github.com/bazelbuild/bazelisk/releases/tag/v1.16.0 +[kubectl]: https://github.com/kubernetes/kubernetes/releases/tag/v1.26.2 +[coder]: https://github.com/coder/coder/releases/tag/v0.19.2 +[bazel]: https://github.com/bazelbuild/bazel/releases/tag/6.1.0 +[helm]: https://github.com/helm/helm/releases/tag/v3.11.2 ### Helm Helm comes with Bitnami's charts library preconfigured. diff --git a/images/dotnet/Dockerfile b/images/dotnet/Dockerfile index 3460e71..6fbb14f 100644 --- a/images/dotnet/Dockerfile +++ b/images/dotnet/Dockerfile @@ -22,10 +22,10 @@ FROM ghcr.io/auguwu/coder-images/base ENV USERNAME=noel -ENV DOTNET_VERSION=7.0.102 +ENV DOTNET_VERSION=7.0.201 ENV DEBIAN_FRONTEND=noninteractive -ENV X64_PR="c646b288-5d5b-4c9c-a95b-e1fad1c0d95d/e13d71d48b629fe3a85f5676deb09e2d" -ENV ARM_PR="72ec0dc2-f425-48c3-97f1-dc83740ba400/78e8fa01fa9987834fa01c19a23dd2e7" +ENV X64_PR="ec76d8ee-8776-42ce-b158-f723a221fc56/0baa1089edf0e0674d719f6a5d847b75" +ENV ARM_PR="35901872-1f00-48e4-9f55-e6c79823e7fd/8af43bb5e25d090c0af921974287ac2c" USER root diff --git a/images/dotnet/README.md b/images/dotnet/README.md index b08c978..5140c2f 100644 --- a/images/dotnet/README.md +++ b/images/dotnet/README.md @@ -4,6 +4,6 @@ This image extends from the [base image](https://github.com/auguwu/coder-images/ ## Bundled Software | Name | Description | Version | | -------- | ---------------------------------------------------------- | ---------------------- | -| .NET SDK | Free. Cross-platform. Open source. Build any app with .NET | [v7.0.102][dotnet-sdk] | +| .NET SDK | Free. Cross-platform. Open source. Build any app with .NET | [v7.0.103][dotnet-sdk] | -[dotnet-sdk]: https://github.com/dotnet/sdk/releases/tag/v7.0.102 +[dotnet-sdk]: https://github.com/dotnet/sdk/releases/tag/v7.0.103 diff --git a/images/golang/Dockerfile b/images/golang/Dockerfile index abb137a..305f2e8 100644 --- a/images/golang/Dockerfile +++ b/images/golang/Dockerfile @@ -27,9 +27,9 @@ ENV USERNAME=noel USER root # Put versions in environment variables -ENV GOLANG_VERSION="1.20" -ENV GORELEASER_VERSION="1.15.2" -ENV GOLANGCI_VERSION="1.51.1" +ENV GOLANG_VERSION="1.20.2" +ENV GORELEASER_VERSION="1.16.1" +ENV GOLANGCI_VERSION="1.51.2" # Install packages here. RUN set -eux; \ diff --git a/images/golang/README.md b/images/golang/README.md index 6cc2126..a4459c6 100644 --- a/images/golang/README.md +++ b/images/golang/README.md @@ -4,10 +4,10 @@ This is the Docker image that bundles the Go compiler with **goreleaser** and ** ## Bundled Software | Name | Description | Version | | ---------- | -------------------------------------------------- | --------------------- | -| Go | The Go programming language | [v1.20][golang] | -| GoReleaser | Deliver Go binaries as fast and easily as possible | [v1.15.2][goreleaser] | -| Golang CI | Fast linters Runner for Go | [v1.51.1][golangci] | +| Go | The Go programming language | [v1.20.2][golang] | +| GoReleaser | Deliver Go binaries as fast and easily as possible | [v1.16.1][goreleaser] | +| Golang CI | Fast linters Runner for Go | [v1.51.2][golangci] | -[goreleaser]: https://github.com/goreleaser/goreleaser/releases/tag/v1.15.2 -[golangci]: https://github.com/golangci/golangci-lint/releases/tag/v1.51.1 -[golang]: https://github.com/golang/go/releases/tag/go1.20 +[goreleaser]: https://github.com/goreleaser/goreleaser/releases/tag/v1.16.1 +[golangci]: https://github.com/golangci/golangci-lint/releases/tag/v1.51.2 +[golang]: https://github.com/golang/go/releases/tag/go1.20.2 diff --git a/images/java/Dockerfile b/images/java/Dockerfile index 092c02a..72496c6 100644 --- a/images/java/Dockerfile +++ b/images/java/Dockerfile @@ -27,8 +27,8 @@ ENV USERNAME=noel USER root # Set version environment variables -ENV GRADLE_VERSION="8.0" -ENV MAVEN_VERSION="3.8.7" +ENV GRADLE_VERSION="8.0.2" +ENV MAVEN_VERSION="3.9.0" # install required things RUN DEBIAN_FRONTEND="noninteractive" apt install -y wget libarchive-tools diff --git a/images/java/README.md b/images/java/README.md index 54c2fb4..b30dd0a 100644 --- a/images/java/README.md +++ b/images/java/README.md @@ -5,9 +5,9 @@ This image extends the [base image](https://github.com/auguwu/coder-images/pkgs/ | Name | Description | Version | | ------ | --------------------------------------------------- | -----------------------------| | JDK | The Java development kit. | [19.0.2+7][temurin-release] | -| Gradle | Adaptable, fast automation for all | [v8.0][gradle-release] | -| Maven | Software project management and comprehension tool. | [v3.8.7][maven-release] | +| Gradle | Adaptable, fast automation for all | [v8.0.2][gradle-release] | +| Maven | Software project management and comprehension tool. | [v3.9.0][maven-release] | [temurin-release]: https://github.com/adoptium/temurin19-binaries/releases/tag/jdk-19.0.2%2B7 -[gradle-release]: https://github.com/gradle/gradle/releases/tag/v8.0.0 -[maven-release]: https://github.com/apache/maven/releases/tag/maven-3.8.7 +[gradle-release]: https://github.com/gradle/gradle/releases/tag/v8.0.2 +[maven-release]: https://github.com/apache/maven/releases/tag/maven-3.9.0 diff --git a/images/node/Dockerfile b/images/node/Dockerfile index ff76662..0623021 100644 --- a/images/node/Dockerfile +++ b/images/node/Dockerfile @@ -27,7 +27,7 @@ ENV USERNAME=noel USER root # versions here -ENV NODE_VERSION="19.6.0" +ENV NODE_VERSION="19.7.0" # Install xz-utils so we can unpack the Node.js installation RUN DEBIAN_FRONTEND="noninteractive" apt install -y xz-utils diff --git a/images/node/README.md b/images/node/README.md index fa127f5..477b133 100644 --- a/images/node/README.md +++ b/images/node/README.md @@ -4,6 +4,6 @@ This image extends from the [base image](https://github.com/auguwu/coder-images/ ## Bundled Software | Name | Description | Version | | ------- | ----------------------------------- | ---------------- | -| Node.js | Node.js JavaScript runtime ✨🐢🚀✨ | [v19.6.0][node] | +| Node.js | Node.js JavaScript runtime ✨🐢🚀✨ | [v19.7.0][node] | -[node]: https://github.com/nodejs/node/releases/v19.6.0 +[node]: https://github.com/nodejs/node/releases/v19.7.0 diff --git a/images/rust/Dockerfile b/images/rust/Dockerfile index 6ecfcca..e278770 100644 --- a/images/rust/Dockerfile +++ b/images/rust/Dockerfile @@ -27,8 +27,8 @@ ENV USERNAME=noel USER root # rust version to install -ENV RUSTUP_VERSION="1.25.1" -ENV RUST_VERSION="1.67.1" +ENV RUSTUP_VERSION="1.25.2" +ENV RUST_VERSION="1.68.0" # Install the Rust (minimal) toolchain RUN apt install -y --no-install-recommends ca-certificates gcc libc6-dev diff --git a/images/rust/README.md b/images/rust/README.md index 4f5c036..03e25fd 100644 --- a/images/rust/README.md +++ b/images/rust/README.md @@ -6,4 +6,4 @@ This image extends the [base image](https://github.com/auguwu/coder-images/pkgs/ | ---- | ------------------------------------------------------------- | --------------- | | Rust | Empowering everyone to build reliable and efficient software. | [v1.67.1][rust] | -[rust]: https://github.com/rust-lang/rust/releases/tag/1.67.1 +[rust]: https://github.com/rust-lang/rust/releases/tag/1.68.0 diff --git a/template/.terraform.lock.hcl b/template/.terraform.lock.hcl index 982d3a7..bf7fc32 100644 --- a/template/.terraform.lock.hcl +++ b/template/.terraform.lock.hcl @@ -2,23 +2,23 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/coder/coder" { - version = "0.6.12" - constraints = "0.6.12" + version = "0.6.17" + constraints = "0.6.17" hashes = [ - "h1:3KIywYaGCsFSa7ABZZpIWYwS+JOHvksC+jIkY3z8Rrk=", - "h1:P6HW3E7Na2j1PIXJWoirNm52jClLicFnVeEF8/P6gCw=", - "h1:b02uefbLKwbGhzuPb0wN85yWUHXHaWF5xefRBbDeXCY=", - "h1:b970qn1yZ5pLxDwukLR7Yhu8+AViYgHNSVY7UWL7rRM=", - "h1:bi7lLuvmlVjAcdbCR23UCUyJWGaQtr1fLB8kReAhK0w=", - "h1:do/B2g6hW4hWRSSG9P3p9YPSlHQTAVXXkd5QEdgrLag=", - "h1:eNaOF841z1m+cyvFGHZCB/kc0m1NH/AGMNYbjkgqnTw=", - "h1:fDiUgdktCqy5W/8Hwwlt/3pWlRI1aGrMy8ZwCnkV2mM=", - "h1:hEkPCvvxcDChG5PmzVVapZIE+Wr7wZ6dewJWisYDndw=", - "h1:ixmQzV8RqkiEBxBvgT6YPOgCSCA9vGviMarHBKd2GUo=", - "h1:on8shg3CGxHne1GQncc7QgnOtJhCTwFoq8SDnCt7rrQ=", - "h1:rflkrtz0TpjoU4kC1YFgZSgsTJzZrc+97WeUdBYqsU4=", - "h1:uKg2Ii5QRquubz97fzaULwlVawHL5b4zNPfOUFHABys=", - "h1:z7EJbTRYJmBw1CJdocfR5TqPZoqLepsiKu0VqwerEQw=", + "h1:06B9DCJcI+9NSOiAuT9xMcekRf7OBOItaXDbp0+ECIU=", + "h1:2D7g27VxcdJSnJNTQtKcvCVKoZi9nQDnyiXL6lnebNo=", + "h1:2IpkDUM8EiqaWS/7eo1qUmrpmkNLRU7pIme5Rr3lnmY=", + "h1:2eW3ogleWRrgOJP3Xc8LYgh3lG2mNe/g7WxvklGPJ9o=", + "h1:7dyYyB6uFsdTqCO0WUa3IrrZooIGQB0C/PjgPTiiHhU=", + "h1:UyN6n/5Ywre4GYNSeN+2Z/rFqDMQHtEn5o//+4NCKlQ=", + "h1:WLaXDc0N+1yLkzjTPjDGM6KA254GiN+yEhrT2f6cnMA=", + "h1:dLtNfPemxW0aaJeJDKs1qyzkzQL0EC1gie6vYCSF7pk=", + "h1:g0VZvwkWBWLasztFN7uHBzX9R229SXDlXjPW9tQOKHU=", + "h1:ist00Y+aXL7SaVfrkUaELZ4fIZ77K9x+EntTUWNV24A=", + "h1:nEd+dl89O8AlogCO9gAP/6gB8hzJV9RZ6M9WHHJntTE=", + "h1:nIMH2aN9Bwh7ntOMmqOGqrMuiF55fWNp2xwoTYoXPLE=", + "h1:oDZZZD0TXVoo3VjpCHDUSL1E0qjBZRugK14strI+/mk=", + "h1:xMN0hPdN0AOrCIKwyYxpd/pBuIa5JHxzB+eT01CjdUY=", ] } diff --git a/template/main.tf b/template/main.tf index 5cd6295..8737636 100644 --- a/template/main.tf +++ b/template/main.tf @@ -23,7 +23,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "0.6.12" + version = "0.6.17" } docker = { @@ -58,6 +58,11 @@ resource "coder_agent" "main" { # Fix folder permissions since root owns /home/noel for some reason??? sudo chown -R noel:noel /home/noel + # Run Docker in the background + if command -v dockerd &> /dev/null; then + sudo dockerd & + fi + # Install code-server if enabled ${var.install_codeserver == true ? "curl -fsSL https://code-server.dev/install.sh | sh" : ""} ${var.install_codeserver == true ? "code-server --auth none --port 3621" : ""} @@ -121,6 +126,7 @@ resource "docker_container" "workspace" { } command = ["/bin/bash", "-c", coder_agent.main.init_script] + runtime = "sysbox-runc" image = var.custom_image != "" ? var.custom_image : "ghcr.io/auguwu/coder-images/${var.base_image}:latest" name = data.coder_workspace.me.name } diff --git a/template/variables.tf b/template/variables.tf index 555d723..8a6ae98 100644 --- a/template/variables.tf +++ b/template/variables.tf @@ -19,12 +19,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -variable "enable_dind" { - description = "If the template should initialize a sidecar container for Docker in Docker usage. Don't enable this if the host can't run privileged containers." - default = false - type = bool -} - variable "workspace_dir" { description = "The directory of where your workspace should be cloned." default = "/home/noel/workspace"