ubuntu:22.04
Building the base image is required.
docker build -t carbon-ubuntu2204-base ./ubuntu2204/base
Build image using git repository
docker build -t carbon-ubuntu2204 ./ubuntu2204/github
Build image using copy instruction
docker build -f ./ubuntu2204/Dockerfile -t carbon-ubuntu2204 ..
Run image
docker run carbon-ubuntu2204
Run image using specific file
docker run carbon-ubuntu2204 bazel run //explorer -- ./explorer/testdata/print/format_only.carbon
Run from the repository root for PWD.
cd ..
docker run -w "/carbon-lang" -v "${PWD}:/carbon-lang" "carbon-ubuntu2204-base" bazel run "//explorer" -- "./explorer/testdata/print/format_only.carbon"