Skip to content

Instantly share code, notes, and snippets.

@madelaney
Created April 7, 2021 12:02
Show Gist options
  • Save madelaney/8044b040d8b83d406e8014f9a5e04314 to your computer and use it in GitHub Desktop.
Save madelaney/8044b040d8b83d406e8014f9a5e04314 to your computer and use it in GitHub Desktop.
{
"variables": {
"nginx.linux": "alpine",
"nginx.version": "1.19.9",
"build.date": "{{timestamp}}",
"build.name": "sample-container",
"build.version": "1.0.0",
"private.registry": "<private registry url here>"
},
"builders": [
{
"type": "docker",
"image": "{{user `private.registry`}}/nginx:{{user `nginx.version`}}-{{user `nginx.linux`}}",
"commit": true,
"changes": [
"EXPOSE 80",
"ENTRYPOINT [\"/docker-entrypoint.sh\"]"
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"apk add --no-cache bash"
]
}
],
"post-processors": [
[
{
"type": "docker-tag",
"repository": "{{user `private.registry`}}/{{user `build.name`}}",
"tag": ["latest"
]
},
{
"type": "docker-push"
}
]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment