Skip to content

Instantly share code, notes, and snippets.

@sebgoa
Created July 17, 2017 13:06
Show Gist options
  • Save sebgoa/c76d875daf02439522c35663593abf36 to your computer and use it in GitHub Desktop.
Save sebgoa/c76d875daf02439522c35663593abf36 to your computer and use it in GitHub Desktop.
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_build", "docker_push")
docker_build(
name = "nginx",
labels = {"maintainer" : "Bitnami <containers@bitnami.com>"},
base = "@bitnami_minideb//image:image.tar",
debs = [
"@glibc//file",
],
symlinks = {
"/opt/bitnami/nginx/html" : "/app",
},
env = {
"BITNAMI_APP_NAME" : "nginx",
"BITNAMI_IMAGE_VERSION" : "1.12.0-r3",
"NGINX_HTTPS_PORT_NUMBER" : "443",
"NGINX_HTTP_PORT_NUMBER" : "80",
"PATH" : "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bitnami/nami/bin:/opt/bitnami/nginx/sbin:$PATH",
},
ports = ["80", "443"],
volumes = ["/bitnami/nginx"],
workdir = "/app",
entrypoint = ["/entrypoint.sh"],
cmd = ["/run.sh"],
files = ["entrypoint.sh",
"run.sh",
"nginx-inputs.json",
"@nginx_bitnami//file"],
)
docker_push(
name = "push_nginx",
image = ":nginx",
registry = "gcr.io",
repository = "skippbox/bazel",
tag = "dev",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment