initialize docker packer image

This commit is contained in:
Antoine 2020-02-09 15:30:03 +01:00
commit 7bccaad723
5 changed files with 35 additions and 0 deletions

3
.env Normal file
View File

@ -0,0 +1,3 @@
REGISTRY_URL=docker.registry
IMAGE_NAME=packer-builder
VERSION=1.0.0

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
# ignore file for git
*.iso
*.tar
*.bz2

4
Makefile Normal file
View File

@ -0,0 +1,4 @@
.PHONY: up
up:
docker-compose up --build -d

13
docker-compose.yml Normal file
View File

@ -0,0 +1,13 @@
version: '3.7'
services:
gentoo_packer:
image: ${REGISTRY_URL}/${IMAGE_NAME}:${VERSION}
build:
context: ./packer
entrypoint: "bash -c"
command: "'while sleep 3600; do :; done'"
stdin_open: true
tty: true
volumes:
- "./assets:/packer/"

10
packer/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM hashicorp/packer:1.5.1
RUN apk add --update qemu qemu-system-x86_64 qemu-img
RUN find / -iname '*qemu*'
ENV PACKER_LOG=1
ENTRYPOINT ["/bin/packer"]