Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
OCamlPro
ocaml-docker-images
Commits
b943c1bf
Commit
b943c1bf
authored
Apr 21, 2020
by
Louis Gesbert
Browse files
Initial commit
parents
Pipeline
#9168
passed with stage
in 13 minutes and 31 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
0 deletions
+53
-0
.gitlab-ci.yml
.gitlab-ci.yml
+16
-0
Dockerfile
Dockerfile
+35
-0
README.md
README.md
+2
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
b943c1bf
build
:
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
|
echo "{
\"auths\": {
\"$CI_REGISTRY\": {
\"username\":\"$CI_REGISTRY_USER\",
\"password\":\"$CI_REGISTRY_PASSWORD\"
}}}
" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:4.10
only
:
-
master
Dockerfile
0 → 100644
View file @
b943c1bf
FROM
alpine:3.11 as compilation
ARG
OCAML_VERSION=4.10.0
RUN
apk add gcc g++ make
ADD
https://github.com/ocaml/ocaml/archive/${OCAML_VERSION}.tar.gz /src/ocaml.tar.gz
WORKDIR
/src/ocaml
RUN
tar
xzf ../ocaml.tar.gz
--strip-components
=
1
RUN
./configure
RUN
make world.opt
RUN
make
install
ARG
OPAM_VERSION=2.1.0-alpha
ADD
https://github.com/ocaml/opam/releases/download/${OPAM_VERSION}/opam-full-${OPAM_VERSION}.tar.gz /src/opam.tar.gz
WORKDIR
/src/opam
RUN
tar
xzf ../opam.tar.gz
--strip-components
=
1
RUN
./configure
RUN
make lib-ext
RUN
make
RUN
make
install
RUN
rm
-rf
/src
FROM
alpine:3.11 as target
LABEL
Description="Minimal OCaml + opam Alpine container" Vendor="OCamlPro"
RUN
apk add gcc make curl
COPY
--from=compilation /usr/local /usr/local
RUN
addgroup
-S
ocaml
&&
adduser
-S
ocaml
-G
ocaml
-s
/bin/sh
USER
ocaml
WORKDIR
/home/ocaml
RUN
[
"/usr/local/bin/opam"
,
"init"
,
"-a"
,
"--bare"
,
"--disable-sandboxing"
]
README.md
0 → 100644
View file @
b943c1bf
This repo contains a simple Dockerfile for a minimal OCaml + opam container.
It is used to generate images for (and using) gitlab.ocamlpro.com CI.
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