-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ubi8
95 lines (84 loc) · 3.2 KB
/
Dockerfile.ubi8
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Copyright 2022-2024 The MathWorks, Inc.
# To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument.
# Use lower case to specify the release, for example: ARG MATLAB_RELEASE=r2022b
ARG MATLAB_RELEASE=R2024b
# Build on top of UBI 8
FROM registry.access.redhat.com/ubi8/ubi:latest
# Declare the global argument to use at the current build stage
ARG MATLAB_RELEASE
ARG HOME=/home/polyspace
# Install Polyspace Bug Finder and Code Prover dependencies
LABEL maintainer="The MathWorks"
ENV TZ="Etc/UTC"
RUN yum update --disableplugin=subscription-manager -y && \
yum install --disableplugin=subscription-manager -y \
alsa-lib.x86_64 \
cairo.x86_64 \
cairo-gobject.x86_64 \
cups-libs.x86_64 \
gdk-pixbuf2.x86_64 \
glib2.x86_64 \
glibc.x86_64 \
glibc-langpack-en.x86_64 \
gtk3.x86_64 \
libICE.x86_64 \
libXcomposite.x86_64 \
libXcursor.x86_64 \
libXdamage.x86_64 \
libXfixes.x86_64 \
libXft.x86_64 \
libXinerama.x86_64 \
libXrandr.x86_64 \
libXt.x86_64 \
libXtst.x86_64 \
libXxf86vm.x86_64 \
libdrm.x86_64 \
libglvnd-glx.x86_64 \
libsndfile.x86_64 \
libuuid.x86_64 \
libwayland-client.x86_64 \
libxcrypt.x86_64 \
mesa-libgbm.x86_64 \
nspr.x86_64 \
nss.x86_64 \
nss-util.x86_64 \
pam.x86_64 \
pango.x86_64 \
zlib.x86_64
# Install mpm dependencies
RUN yum install --disableplugin=subscription-manager -y \
wget.x86_64 \
unzip.x86_64 \
sudo.x86_64 \
ca-certificates && \
yum --disableplugin=subscription-manager clean all -y
# Run mpm to install Polyspace Bug Finder and Code Prover Server in the target location
# and delete the mpm installation afterwards
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm && \
chmod +x mpm && \
./mpm install \
--release=${MATLAB_RELEASE} \
--destination=/opt/matlab \
--products Polyspace_Bug_Finder_Server Polyspace_Code_Prover_Server && \
rm -f mpm /tmp/mathworks_root.log && \
ln -s /opt/matlab/polyspace/bin/polyspace* /usr/local/bin/
# Add a "polyspace" user and grant sudo permission.
RUN adduser --home ${HOME} --shell /bin/bash --password "" --groups wheel polyspace
# One of the following 2 ways of configuring the license server to use must be
# uncommented.
ARG LICENSE_SERVER
# Specify the host and port of the machine that serves the network licenses
# if you want to bind in the license info as an environment variable. This
# is the preferred option for licensing. It is either possible to build with
# something like --build-arg LICENSE_SERVER=27000@MyServerName, alternatively
# you could specify the license server directly using
# ENV MLM_LICENSE_FILE=27000@flexlm-server-name
ENV MLM_LICENSE_FILE=$LICENSE_SERVER
# Alternatively you can put a license file into the container.
# You should fill this file out with the details of the license
# server you want to use and uncomment the following line.
# COPY network.lic /opt/matlab/licenses/
# Set user and work directory
USER polyspace
WORKDIR ${HOME}
CMD []