diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 527b50c5f4ac..000000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,36 +0,0 @@ -// Part of the Carbon Language project, under the Apache License v2.0 with LLVM -// Exceptions. See /LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -{ - "name": "carbon-lang", - "build": { - "dockerfile": "../docker/ubuntu2404/base/Dockerfile" - }, - "mounts": [ - { - "source": "carbon-cache", - "target": "/home/ubuntu/.cache", - "type": "volume" - } - ], - "containerUser": "ubuntu", - "remoteUser": "ubuntu", - // When using devcontainer with podman, you may see /workspace being owned - // by root. To work around this, uncomment the following lines - // "runArgs": [ - // "--userns=keep-id" - // ], - "customizations": { - "vscode": { - "extensions": [ - "bazelbuild.vscode-bazel", - "bierner.github-markdown-preview", - "daohong-emilio.yash", - "esbenp.prettier-vscode", - "llvm-vs-code-extensions.vscode-clangd", - "ms-python.python" - ] - } - } -} diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index c32692db1260..000000000000 --- a/docker/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Docker - - - -ubuntu:22.04 - -## Build and run image - -### Build - -Building the base image is required. - -``` -docker build -t carbon-ubuntu2404-base ./ubuntu2404/base -``` - -Build image using git repository - -```bash -docker build -t carbon-ubuntu2404 ./ubuntu2404/github -``` - -Build image using copy instruction - -```bash -docker build -f ./ubuntu2404/Dockerfile -t carbon-ubuntu2404 .. -``` - -Run image - -```bash -docker run carbon-ubuntu2404 -``` - -Run image using specific file - -```bash -docker run carbon-ubuntu2404 bazel run //explorer -- ./explorer/testdata/print/format_only.carbon -``` - -### Using a mounted volume - -Run from the repository root for PWD. - -``` -cd .. -``` - -```bash -docker run -w "/carbon-lang" -v "${PWD}:/carbon-lang" "carbon-ubuntu2404-base" bazel run "//explorer" -- "./explorer/testdata/print/format_only.carbon" -``` diff --git a/docker/ubuntu2404/Dockerfile b/docker/ubuntu2404/Dockerfile deleted file mode 100644 index 0e05572dceaf..000000000000 --- a/docker/ubuntu2404/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -FROM carbon-ubuntu2404-base as carbon-ubuntu2404-build - -COPY . /carbon-lang -WORKDIR /carbon-lang - -# Build -RUN bazel build //explorer - -FROM carbon-ubuntu2404-build - -CMD ["bazel", "run", "//explorer", "--", "./explorer/testdata/print/format_only.carbon"] diff --git a/docker/ubuntu2404/base/Dockerfile b/docker/ubuntu2404/base/Dockerfile deleted file mode 100644 index f62eb1109544..000000000000 --- a/docker/ubuntu2404/base/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -FROM ubuntu:24.04 as carbon-ubuntu2404-base - -# Install apt tools: -# git: Used by VS Code. -# golang: Used for Bazelisk and Buildifier. -# python3: For Carbon tools. -# gnupg, software-properties-common, wget: For llvm.sh. -# apt-get update and install together per Docker best practice. -RUN apt-get update && \ - apt-get install -y \ - git \ - gnupg \ - golang \ - python3-pip \ - python3 \ - software-properties-common \ - wget \ - nodejs \ - npm - -ENV PATH="/root/go/bin:${PATH}" - -# Bazelisk is used for Carbon builds. -RUN go install github.com/bazelbuild/bazelisk@v1.14.0 -RUN ln -s /root/go/bin/bazelisk /root/go/bin/bazel - -# Buildifier is used by the Bazel VS Code extension. -RUN go install github.com/bazelbuild/buildtools/buildifier@5.1.0 - -# Install LLVM from apt.llvm.org. -RUN wget https://apt.llvm.org/llvm.sh -RUN chmod +x llvm.sh -RUN ./llvm.sh 18 all -RUN rm llvm.sh - -# Add the lib dir to the PATH. This helps Bazel find clang and VS Code find -# clangd, without version suffixes. -ENV PATH="/usr/lib/llvm-18/bin:${PATH}" - -# Update pip and install black and pre-commit. -RUN pip3 install black pre-commit --break-system-packages - -# Create .cache directory with proper ownership. We will mount a named volume -# at this location to allow caching of bazel build files. -RUN mkdir /home/ubuntu/.cache && chown -R ubuntu:ubuntu /home/ubuntu/.cache diff --git a/docker/ubuntu2404/github/Dockerfile b/docker/ubuntu2404/github/Dockerfile deleted file mode 100644 index 84f937305f00..000000000000 --- a/docker/ubuntu2404/github/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -FROM carbon-ubuntu2404-base as carbon-ubuntu2404-github-build - -# Clone git repository -RUN git clone https://github.com/carbon-language/carbon-lang - -WORKDIR /carbon-lang - -# Setup pre-commit -RUN pre-commit install - -# Build -RUN bazel build //explorer - -FROM carbon-ubuntu2404-github-build - -CMD ["bazel", "run", "//explorer", "--", "./explorer/testdata/print/format_only.carbon"] diff --git a/docs/project/contribution_tools.md b/docs/project/contribution_tools.md index cb8b360e979c..f2c3fc428946 100644 --- a/docs/project/contribution_tools.md +++ b/docs/project/contribution_tools.md @@ -227,13 +227,6 @@ considering if they fit your workflow. **either** normal terminals **or** Visual Studio Code to run `bazel`, not both in combination. Visual Studio Code can still be used for other purposes, such as editing files, without interfering with `bazel`. - - [DevContainers](https://code.visualstudio.com/docs/remote/containers): A - way to use Docker for build environments. - - After following the - [installation instructions](https://code.visualstudio.com/docs/remote/containers#_installation), - you should be prompted to use Carbon's - [devcontainer](/.devcontainer/devcontainer.json) with "Reopen in - container". - [clangd](https://clangd.llvm.org/installation): An LSP server implementation for C/C++. - To ensure that `clangd` reports accurate diagnostics. It needs a