Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
.devcontainer: Generalize to other distros
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed May 14, 2022
1 parent 8d7f7ab commit 96bb5ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
10 changes: 4 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ARG VARIANT="jammy"
FROM ghcr.io/sagemath/sage/sage-docker-ubuntu-${VARIANT}-standard-with-system-packages:dev

# Install additional packages needed for devcontainer support in VS code
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends gpgconf openssh-client
ARG SYSTEM_FACTOR="ubuntu-jammy"
ARG PACKAGE_FACTOR="standard"
ARG DOCKER_TARGET="with-system-packages"
FROM ghcr.io/sagemath/sage/sage-docker-${SYSTEM_FACTOR}-${PACKAGE_FACTOR}-${DOCKER_TARGET}:dev
12 changes: 9 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
// For format details, see https://aka.ms/devcontainer.json.
{
"name": "Ubuntu",
"name": "Ubuntu jammy",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: hirsute, focal, bionic, xenial, trusty, etc.
"args": { "VARIANT": "jammy" }
// See tox.ini for definitions
"args": { "SYSTEM_FACTOR": "ubuntu-jammy",
"PACKAGE_FACTOR": "standard",
"DOCKER_TARGET": "with-system-packages",
"DOCKER_TAG": "dev"
}
},
// Run commands after the container is created:
"postCreateCommand": "export PATH=$(pwd)/build/bin:$PATH && SYSTEM=$(sage-guess-package-system) && eval $(sage-print-system-package-command $SYSTEM install --yes $(sage-get-system-packages $SYSTEM _develop))",
// Run commands after the container is started.
"postStartCommand": "./bootstrap && ./configure --enable-build-as-root && make build"
}

0 comments on commit 96bb5ad

Please sign in to comment.