Last active
July 17, 2017 13:05
-
-
Save sebgoa/14d698307113f32c70899c06563b40c1 to your computer and use it in GitHub Desktop.
BUILD bazel docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_build", "docker_push") | |
docker_build( | |
name = "nginx", | |
labels = {"maintainer" : "Bitnami <[email protected]>"}, | |
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