The Docker image is used in the initialization process, to copy everything in the custom folder to the Gitea data dir (mounted as a persistent volume). It is built using Packer and is based on the busybox image, so we can use its minimalist shell system to copy files and set permissions
30 lines
542 B
JSON
30 lines
542 B
JSON
{
|
|
"builders": [{
|
|
"type": "docker",
|
|
"image": "busybox",
|
|
"run_command": ["-d", "-i", "-t", "{{.Image}}", "/bin/sh"],
|
|
"commit": true
|
|
}],
|
|
"provisioners": [
|
|
{
|
|
"inline": ["mkdir /custom"],
|
|
"type": "shell"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "../custom/",
|
|
"destination": "/custom"
|
|
}
|
|
],
|
|
"post-processors": [
|
|
[
|
|
{
|
|
"type": "docker-tag",
|
|
"repository": "eu.gcr.io/fluted-magpie-218106/gitea_custom",
|
|
"tag": "0.1"
|
|
},
|
|
"docker-push"
|
|
]
|
|
]
|
|
}
|