Skip to content
Snippets Groups Projects
Commit a0af95ee authored by Mickael Masquelin's avatar Mickael Masquelin
Browse files

feat(exemples-packer): Fixes sur les templates Ubuntu jammy

parent c6309789
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,17 @@
source "docker" "ubu-form-cnrs-nginx" {
image = "ubuntu:jammy"
commit = true
run_command = [
"-d", "-i", "-t", "{{.Image}}", "/bin/bash"
]
changes = [
"WORKDIR /var/www/html",
"ENV HOSTNAME localhost",
"EXPOSE 80 443",
"LABEL version=1.0.0",
"ONBUILD RUN date",
"ENTRYPOINT [\"nginx\", \"-g\", \"daemon off;\"]",
]
}
# Construire l'image "personnalisée"
......@@ -16,15 +27,17 @@ build {
"DEBIAN_FRONTEND=noninteractive apt-get -qq -y install curl nginx",
"apt-get clean autoclean",
"apt-get autoremove --yes",
"rm -fr /var/lib/apt/lists/*"
"rm -fr /var/lib/apt/lists/*",
# commande à éviter ci-après : vous ne
# gagnez que quelques Ko et plus rien
# ne peut dériver de cette image de base
# rm -rf /var/lib/{apt,dpkg,cache,log}/
"ln -sf /dev/stdout /var/log/nginx/access.log",
"ln -sf /dev/stderr /var/log/nginx/error.log",
]
}
# Tag de l'image Docker créé
# Tag de l'image Docker créé + personnalisation
post-processors {
post-processor "docker-tag" {
repository = "local/ubu-form-cnrs-nginx"
......
......@@ -2,6 +2,9 @@
source "docker" "ubuntu-formation-cnrs" {
image = "ubuntu:jammy"
commit = true
run_command = [
"-d", "-i", "-t", "{{.Image}}", "/bin/bash"
]
}
# Construire l'image "personnalisée"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment