-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (52 loc) · 3.91 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (52 loc) · 3.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# --------------------------------------------------------------------------- #
# Dockerfile for CI/CD #
# #
# This file contains the commands to build a Docker image with all #
# the packages needed to build and test the project. The same image #
# serves both CIs: GitLab pulls it from its container registry and #
# GitHub Actions from the GitHub one (ghcr.io): #
# #
# GitLab : registry.gitlab.com/smspp/smspp-project #
# GitHub : ghcr.io/smspp-project/smspp-project #
# #
# On GitHub the image is (re)built and pushed automatically by the #
# .github/workflows/docker-image.yml workflow whenever this file or #
# INSTALL.sh changes. To build and push it by hand for GitLab, log #
# in to the registry with: #
# #
# $ docker login registry.gitlab.com #
# #
# build this with: #
# #
# $ docker build --no-cache --pull \ #
# -t registry.gitlab.com/smspp/smspp-project . #
# #
# The --no-cache --pull flags force a fresh build: INSTALL.sh is #
# fetched at build time, so Docker would otherwise reuse the cached #
# RUN layer and silently keep an outdated image. #
# #
# upload with: #
# #
# $ docker push registry.gitlab.com/smspp/smspp-project #
# #
# run (locally) with: #
# #
# $ docker run --rm -it registry.gitlab.com/smspp/smspp-project:latest #
# #
# Note: rebuild and upload the image when this file or INSTALL.sh #
# changes, not when SMS++ changes. #
# #
# Note: Gurobi is installed but unlicensed: the CI jobs materialize a #
# WLS license at run time from masked CI/CD variables (GitLab) #
# or secrets (GitHub), so no license ever enters the image. #
# #
# Donato Meoli #
# Dipartimento di Informatica #
# Universita' di Pisa #
# --------------------------------------------------------------------------- #
# Latest Ubuntu image
FROM ubuntu:latest
# Install required packages, run the INSTALL.sh script, and clean up
RUN apt-get update && apt-get install -y wget sudo && \
wget -qO- https://gitlab.com/smspp/smspp-project/-/raw/develop/INSTALL.sh | bash -s -- --without-cplex --without-smspp && \
rm -rf /var/lib/apt/lists/*