From 0fdd3cd71d618b80da4fd487d3312e25f31de288 Mon Sep 17 00:00:00 2001 From: dlorenc Date: Tue, 5 Jun 2018 10:22:21 -0700 Subject: [PATCH] Reorganize repo. --- BUILD | 16 ++++++++-------- README.md | 5 ++++- base/BUILD | 2 +- examples/dotnet/BUILD | 2 +- examples/nodejs/BUILD | 4 ++-- examples/python2.7/BUILD | 2 +- examples/python3/BUILD | 2 +- experimental/BUILD | 1 + {busybox => experimental/busybox}/BUILD | 0 {busybox => experimental/busybox}/commands.bzl | 0 {dotnet => experimental/dotnet}/BUILD | 0 {dotnet => experimental/dotnet}/README.md | 0 {nodejs => experimental/nodejs}/BUILD | 0 {nodejs => experimental/nodejs}/README.md | 0 {python2.7 => experimental/python2.7}/BUILD | 0 {python2.7 => experimental/python2.7}/README.md | 0 .../python2.7}/testdata/python27.yaml | 0 {python3 => experimental/python3}/BUILD | 0 {python3 => experimental/python3}/README.md | 0 .../python3}/testdata/python3.yaml | 0 20 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 experimental/BUILD rename {busybox => experimental/busybox}/BUILD (100%) rename {busybox => experimental/busybox}/commands.bzl (100%) rename {dotnet => experimental/dotnet}/BUILD (100%) rename {dotnet => experimental/dotnet}/README.md (100%) rename {nodejs => experimental/nodejs}/BUILD (100%) rename {nodejs => experimental/nodejs}/README.md (100%) rename {python2.7 => experimental/python2.7}/BUILD (100%) rename {python2.7 => experimental/python2.7}/README.md (100%) rename {python2.7 => experimental/python2.7}/testdata/python27.yaml (100%) rename {python3 => experimental/python3}/BUILD (100%) rename {python3 => experimental/python3}/README.md (100%) rename {python3 => experimental/python3}/testdata/python3.yaml (100%) diff --git a/BUILD b/BUILD index 2897310c7..3f1fc4897 100644 --- a/BUILD +++ b/BUILD @@ -18,14 +18,14 @@ docker_bundle( "gcr.io/{PROJECT_ID}/java:debug": "//java:debug", "gcr.io/{PROJECT_ID}/java/jetty:latest": "//java/jetty", "gcr.io/{PROJECT_ID}/java/jetty:debug": "//java/jetty:debug", - "gcr.io/{PROJECT_ID}/python3:latest": "//python3:python3", - "gcr.io/{PROJECT_ID}/python3:debug": "//python3:debug", - "gcr.io/{PROJECT_ID}/python2.7:latest": "//python2.7:python27", - "gcr.io/{PROJECT_ID}/python2.7:debug": "//python2.7:debug", - "gcr.io/{PROJECT_ID}/nodejs:latest": "//nodejs", - "gcr.io/{PROJECT_ID}/nodejs:debug": "//nodejs:debug", - "gcr.io/{PROJECT_ID}/dotnet:latest": "//dotnet", - "gcr.io/{PROJECT_ID}/dotnet:debug": "//dotnet:debug", + "gcr.io/{PROJECT_ID}/python3:latest": "//experimental/python3:python3", + "gcr.io/{PROJECT_ID}/python3:debug": "//experimental/python3:debug", + "gcr.io/{PROJECT_ID}/python2.7:latest": "//experimental/python2.7:python27", + "gcr.io/{PROJECT_ID}/python2.7:debug": "//experimental/python2.7:debug", + "gcr.io/{PROJECT_ID}/nodejs:latest": "//experimental/nodejs", + "gcr.io/{PROJECT_ID}/nodejs:debug": "//experimental/nodejs:debug", + "gcr.io/{PROJECT_ID}/dotnet:latest": "//experimental/dotnet", + "gcr.io/{PROJECT_ID}/dotnet:debug": "//experimental/dotnet:debug", }, stamp = True, ) diff --git a/README.md b/README.md index 0e328faec..5a2b71a4b 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ Follow these steps to get started: * Pick the right base image for your application stack We publish the following distroless base images on `gcr.io`: * [gcr.io/distroless/base](base/README.md) + * [gcr.io/distroless/java](java/README.md) + * [gcr.io/distroless/cc](cc/README.md) + +* The following images are also published on `gcr.io`, but are considered experimental and not recommended for production usage: * [gcr.io/distroless/python2.7](python2.7/README.md) * [gcr.io/distroless/python3](python3/README.md) * [gcr.io/distroless/nodejs](nodejs/README.md) @@ -77,7 +81,6 @@ Follow these steps to get started: You can find other examples here: - * [Java](examples/java/Dockerfile) * [Python](examples/python2.7/Dockerfile) * [Python 3](examples/python3/Dockerfile) diff --git a/base/BUILD b/base/BUILD index 13b446e45..55f1488ad 100644 --- a/base/BUILD +++ b/base/BUILD @@ -90,7 +90,7 @@ docker_build( directory = "/", entrypoint = ["/busybox/sh"], env = {"PATH": "$PATH:/busybox"}, - tars = ["//busybox:busybox.tar"], + tars = ["//experimental/busybox:busybox.tar"], ) structure_test( diff --git a/examples/dotnet/BUILD b/examples/dotnet/BUILD index 7d704c530..1b2dea472 100644 --- a/examples/dotnet/BUILD +++ b/examples/dotnet/BUILD @@ -5,7 +5,7 @@ load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") docker_build( name = "hello", - base = "//dotnet:dotnet", + base = "//experimental/dotnet:dotnet", cmd = [ "dotnet", "/bin/Release/netcoreapp2.0/hello.dll", diff --git a/examples/nodejs/BUILD b/examples/nodejs/BUILD index 8cf81dcce..94aef9b5e 100644 --- a/examples/nodejs/BUILD +++ b/examples/nodejs/BUILD @@ -6,14 +6,14 @@ load("@io_bazel_rules_docker//docker:docker.bzl", "docker_build") # https://howtonode.org/hello-node docker_build( name = "hello", - base = "//nodejs:nodejs", + base = "//experimental/nodejs:nodejs", cmd = ["hello.js"], files = [":hello.js"], ) docker_build( name = "hello_http", - base = "//nodejs:nodejs", + base = "//experimental/nodejs:nodejs", cmd = ["hello_http.js"], files = [":hello_http.js"], ports = ["8000"], diff --git a/examples/python2.7/BUILD b/examples/python2.7/BUILD index 799019693..c7ed5bd63 100644 --- a/examples/python2.7/BUILD +++ b/examples/python2.7/BUILD @@ -4,7 +4,7 @@ load("@io_bazel_rules_docker//docker:docker.bzl", "docker_build") py_image( name = "hello_py", srcs = ["hello.py"], - base = "//python2.7:python27", + base = "//experimental/python2.7:python27", main = "hello.py", ) diff --git a/examples/python3/BUILD b/examples/python3/BUILD index f9080a918..34b6815dd 100644 --- a/examples/python3/BUILD +++ b/examples/python3/BUILD @@ -4,7 +4,7 @@ load("@io_bazel_rules_docker//docker:docker.bzl", "docker_build") py_image( name = "hello_py", srcs = ["hello.py"], - base = "//python3:python3", + base = "//experimental/python3:python3", main = "hello.py", ) diff --git a/experimental/BUILD b/experimental/BUILD new file mode 100644 index 000000000..ffd0fb0cd --- /dev/null +++ b/experimental/BUILD @@ -0,0 +1 @@ +package(default_visibility = ["//visibility:public"]) diff --git a/busybox/BUILD b/experimental/busybox/BUILD similarity index 100% rename from busybox/BUILD rename to experimental/busybox/BUILD diff --git a/busybox/commands.bzl b/experimental/busybox/commands.bzl similarity index 100% rename from busybox/commands.bzl rename to experimental/busybox/commands.bzl diff --git a/dotnet/BUILD b/experimental/dotnet/BUILD similarity index 100% rename from dotnet/BUILD rename to experimental/dotnet/BUILD diff --git a/dotnet/README.md b/experimental/dotnet/README.md similarity index 100% rename from dotnet/README.md rename to experimental/dotnet/README.md diff --git a/nodejs/BUILD b/experimental/nodejs/BUILD similarity index 100% rename from nodejs/BUILD rename to experimental/nodejs/BUILD diff --git a/nodejs/README.md b/experimental/nodejs/README.md similarity index 100% rename from nodejs/README.md rename to experimental/nodejs/README.md diff --git a/python2.7/BUILD b/experimental/python2.7/BUILD similarity index 100% rename from python2.7/BUILD rename to experimental/python2.7/BUILD diff --git a/python2.7/README.md b/experimental/python2.7/README.md similarity index 100% rename from python2.7/README.md rename to experimental/python2.7/README.md diff --git a/python2.7/testdata/python27.yaml b/experimental/python2.7/testdata/python27.yaml similarity index 100% rename from python2.7/testdata/python27.yaml rename to experimental/python2.7/testdata/python27.yaml diff --git a/python3/BUILD b/experimental/python3/BUILD similarity index 100% rename from python3/BUILD rename to experimental/python3/BUILD diff --git a/python3/README.md b/experimental/python3/README.md similarity index 100% rename from python3/README.md rename to experimental/python3/README.md diff --git a/python3/testdata/python3.yaml b/experimental/python3/testdata/python3.yaml similarity index 100% rename from python3/testdata/python3.yaml rename to experimental/python3/testdata/python3.yaml