Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
2fdd3bda
Commit
2fdd3bda
authored
Apr 07, 2021
by
Kim Nguyễn
Browse files
Make the Dockerfile more generic.
parent
40dca5cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/Dockerfile
View file @
2fdd3bda
...
...
@@ -4,9 +4,6 @@ LABEL maintainer="Kim Nguyen <kim.nguyen@universite-paris-saclay.fr>"
ARG
DEBIAN_FRONTEND=noninteractive
ARG
ocaml_version="4.12.0"
ARG
packages=""
RUN
apt-get update
-y
&&
\
apt-get dist-upgrade
-y
&&
\
apt-get
install
-y
-q
\
...
...
@@ -23,9 +20,8 @@ RUN apt-get update -y && \
libsigsegv2 libstdc++-9-dev libsub-override-perl libtool libtsan0 libubsan1
\
libuchardet0 libx11-dev libxau-dev libxcb1-dev libxdmcp-dev
\
linux-libc-dev m4 make man-db pkg-config po-debconf x11proto-core-dev
\
x11proto-dev libcurl4-gnutls-dev libexpat1-dev pkg-config wget unzip
\
bubblewrap
x11proto-dev libcurl4-gnutls-dev libexpat1-dev pkg-config wget unzip
RUN
mkdir
-p
/usr/local/bin
&&
wget
-O
/usr/local/bin/opam
\
'https://github.com/ocaml/opam/releases/download/2.0.8/opam-2.0.8-x86_64-linux'
&&
\
chmod
755 /usr/local/bin/opam
...
...
@@ -40,18 +36,21 @@ RUN adduser --disabled-password --gecos "" --shell /bin/bash cduce
USER
cduce
ARG
OPAMYES=true
ARG
ocaml_version
ARG
packages
RUN
test
"
$ocaml_version
"
||
test
"
$packages
"
||
exit
1
RUN
opam init
--disable-sandboxing
&&
\
opam switch create
$
{
ocaml_version
}
&&
\
RUN
opam init
--disable-sandboxing
--bare
&&
\
opam switch create
"
$ocaml_version
"
&&
\
eval
`
opam config
env
`
&&
\
test
"
${
packages
}
"
&&
opam
install
-y
${
packages
}
opam
install
-y
${
packages
}
ENV
TZ "Europe/Paris"
ENV
LANG en_US.UTF-8
ENV
LANGUAGE en_US:en
ENV
LC_ALL en_US.UTF-8
ENV
HOME /home/cduce
ENTRYPOINT
[ "opam", "exec", "--" ]
CMD
[ "/bin/sh", "-c", "bash" ]
\ No newline at end of file
CMD
[ "/bin/sh", "-c", "bash" ]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment