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

feat(exemples-packer): Ajout template Jammy+nginx (base)

parent 025bcecb
No related branches found
No related tags found
No related merge requests found
# Pull d'une image Ubuntu 22.04 LTS
source "docker" "ubu-form-cnrs-nginx" {
image = "ubuntu:jammy"
commit = true
}
# Construire l'image "personnalisée"
build {
sources = [
"source.docker.ubu-form-cnrs-nginx"
]
provisioner "shell" {
inline = [
"apt-get update",
"DEBIAN_FRONTEND=noninteractive apt-get -qq -y install curl nginx",
"apt-get clean autoclean",
"apt-get autoremove --yes",
"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}/
]
}
# Tag de l'image Docker créé
post-processors {
post-processor "docker-tag" {
repository = "local/ubu-form-cnrs-nginx"
tags = [
"22.04.2",
"latest"
]
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment