Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
f2fc7811
Commit
f2fc7811
authored
1 year ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[Dev] update Docker base images and use podman if available; add Makefile targets
parent
404e5340
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dev/docker/Makefile
+38
-11
38 additions, 11 deletions
dev/docker/Makefile
with
38 additions
and
11 deletions
dev/docker/Makefile
+
38
−
11
View file @
f2fc7811
...
@@ -23,6 +23,12 @@
...
@@ -23,6 +23,12 @@
.ONESHELL
:
.ONESHELL
:
.PHONY
:
dev* custom* help push
.PHONY
:
dev* custom* help push
ifneq
(, $(shell which podman))
DOCKER
=
podman
else
DOCKER
=
docker
endif
help
:
help
:
@
echo
"Available targets are:"
@
echo
"Available targets are:"
echo
"- dev.*: public Git development version (no gui)"
echo
"- dev.*: public Git development version (no gui)"
...
@@ -49,19 +55,23 @@ DEPS=../../reference-configuration.md Dockerfile *.sh
...
@@ -49,19 +55,23 @@ DEPS=../../reference-configuration.md Dockerfile *.sh
version
=
$(
shell
grep
-o
"^- OCaml [0-9.]
\+
"
"../../reference-configuration.md"
|
grep
-o
"[0-9.]
\+
"
)
version
=
$(
shell
grep
-o
"^- OCaml [0-9.]
\+
"
"../../reference-configuration.md"
|
grep
-o
"[0-9.]
\+
"
)
BUILD_ARGS
+=
--build-arg
=
OCAML_VERSION
=
$(
version
)
BUILD_ARGS
+=
--build-arg
=
OCAML_VERSION
=
$(
version
)
%.debian
:
BUILD_ARGS += --build-arg=DISTRO=debian:bullseye-slim
%.debian
:
BUILD_ARGS += --build-arg=DISTRO=debian:bookworm-slim
%.fedora
:
BUILD_ARGS += --build-arg=DISTRO=fedora:36
%.fedora
:
BUILD_ARGS += --build-arg=DISTRO=fedora:38
%.alpine
:
BUILD_ARGS += --build-arg=DISTRO=alpine:3.16
%.alpine
:
BUILD_ARGS += --build-arg=DISTRO=alpine:3.18
dev-all
:
dev.debian dev-stripped.debian dev-gui.debian
\
dev.fedora dev-stripped.fedora dev-gui.fedora
\
dev.alpine dev-stripped.alpine dev-gui.alpine
dev.%
:
$(DEPS)
dev.%
:
$(DEPS)
cp
../../reference-configuration.md .
cp
../../reference-configuration.md .
docker
build
.
-t
framac/frama-c:
$@
$(
BUILD_ARGS
)
--target
frama-c-slim
$(
DOCKER
)
build
.
-t
framac/frama-c:
$@
$(
BUILD_ARGS
)
--target
frama-c-slim
dev-gui.%
:
dev.%
dev-gui.%
:
dev.%
docker
build
.
-t
framac/frama-c-gui:dev.
$*
$(
BUILD_ARGS
)
--target
frama-c-gui-slim
$(
DOCKER
)
build
.
-t
framac/frama-c-gui:dev.
$*
$(
BUILD_ARGS
)
--target
frama-c-gui-slim
dev-stripped.%
:
dev.%
dev-stripped.%
:
dev.%
docker
build
.
-t
framac/frama-c:
$@
$(
BUILD_ARGS
)
--target
frama-c-stripped
$(
DOCKER
)
build
.
-t
framac/frama-c:
$@
$(
BUILD_ARGS
)
--target
frama-c-stripped
ifeq
($(FRAMAC_ARCHIVE),)
ifeq
($(FRAMAC_ARCHIVE),)
custom.% custom-gui.% custom-stripped.%
:
custom.% custom-gui.% custom-stripped.%
:
...
@@ -74,13 +84,13 @@ else
...
@@ -74,13 +84,13 @@ else
BUILD_ARGS
+=
--build-arg
=
from_archive
=
$(
FRAMAC_ARCHIVE
)
BUILD_ARGS
+=
--build-arg
=
from_archive
=
$(
FRAMAC_ARCHIVE
)
custom.%
:
$(DEPS)
custom.%
:
$(DEPS)
cp
../../reference-configuration.md .
cp
../../reference-configuration.md .
docker
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c-slim
$(
DOCKER
)
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c-slim
custom-gui.%
:
custom.%
custom-gui.%
:
custom.%
docker
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c-gui-slim
$(
DOCKER
)
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c-gui-slim
custom-stripped.%
:
custom.%
custom-stripped.%
:
custom.%
docker
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c-stripped
$(
DOCKER
)
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c-stripped
endif
endif
# check if either TAG or AS are empty
# check if either TAG or AS are empty
...
@@ -93,6 +103,23 @@ push:
...
@@ -93,6 +103,23 @@ push:
echo
"(if you supplied identical tags, just run 'docker push
$(
TAG
)
')"
echo
"(if you supplied identical tags, just run 'docker push
$(
TAG
)
')"
else
else
push
:
push
:
docker
tag
$(
TAG
)
$(
AS
)
$(
DOCKER
)
tag
$(
TAG
)
$(
AS
)
docker
push
$(
AS
)
$(
DOCKER
)
push
$(
AS
)
endif
endif
dev-push-all
:
$(
DOCKER
)
push framac/frama-c:dev.debian
$(
DOCKER
)
push framac/frama-c:dev-stripped.debian
$(
DOCKER
)
push framac/frama-c-gui:dev.debian
$(
DOCKER
)
push framac/frama-c:dev.fedora
$(
DOCKER
)
push framac/frama-c:dev-stripped.fedora
$(
DOCKER
)
push framac/frama-c-gui:dev.fedora
$(
DOCKER
)
push framac/frama-c:dev.alpine
$(
DOCKER
)
push framac/frama-c:dev-stripped.alpine
$(
DOCKER
)
push framac/frama-c-gui:dev.alpine
$(
DOCKER
)
tag framac/frama-c:dev.debian framac/frama-c:dev
$(
DOCKER
)
tag framac/frama-c:dev-stripped.debian framac/frama-c:dev-stripped
$(
DOCKER
)
tag framac/frama-c-gui:dev.debian framac/frama-c-gui:dev
$(
DOCKER
)
push framac/frama-c:dev
$(
DOCKER
)
push framac/frama-c:dev-stripped
$(
DOCKER
)
push framac/frama-c-gui:dev
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment