Skip to content

Commit

Permalink
fix: add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
Thechi2000 committed Sep 5, 2024
1 parent 731b221 commit 1dbe97e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions backend/src/docker.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use std::process::Command;

pub const JAVA_IMAGE: &str = "cimg/openjdk:17.0";
pub const PYTHON_IMAGE: &str = "python:3-bullseye";
pub const CPP_IMAGE: &str = "ghcr.io/clicepfl/s4s-2024-cpp:main";

pub const IMAGES: [&str; 3] = [JAVA_IMAGE, PYTHON_IMAGE, CPP_IMAGE];

pub fn pull_required_images() {
for image in IMAGES {
if let Err(err) = Command::new("docker").args(["pull", image]).status() {
println!("Error while pulling {image}: {err:#?}");
}
}
}

0 comments on commit 1dbe97e

Please sign in to comment.