You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# CLOUDSDK_CONFIG has to point to the $HOME/.config/gcloud directory, otherwise push will fail;
193
191
# DOCKER_CONFIG has to point to a $HOME/.docker with configured docker credential/helper for gcr.io cases or some other auth completed already for private repos;
194
192
# if the docker-credential-gcloud is being used, it has to be symlinked into the limited PATH used by please - either /usr/local/bin or /usr/bin
195
-
# TODO: find a way to remote the unnecessary output
# baseimage: <target> previous container_flatten or container_inject target
60
-
# description: '' what will be the description of the container (optional)
61
-
# image_labels: {} what labels to associate with the container (optional)
62
-
# environment: {} what environment to provide to the container (optional) - equivalent of the ENV in Dockerfiles
63
-
# entrypoint: [] what's the entrypoint of the image (optional)
64
-
# command: [] what's the command of the image (optional)
65
-
# ports: [] what to EXPOSE
63
+
# DESCRIPTION:
64
+
# * name Mandatory. The name of the rule
65
+
# * srcs Mandatory. The list of layers that compose the image
66
+
# * description Optional. The container description as it would be generated by docker
67
+
# * image_labels Optional. Embedded image labels
68
+
# * environment Optional. Same as doing ENV in a Dockerfile
69
+
# * entrypoint Optional. Same as ENTRYPOINT in a Dockerfile
70
+
# * command Optional. Same as CMD in a Dockerfile
71
+
# * ports Optional. Same as EXPOSE in a Dockerfile
72
+
# * osversion Optional (default = linux).
73
+
# * architecture Optional (default = amd64).
74
+
66
75
container_config(
67
-
name='ubuntu_new',
68
-
# baseimage = ":ubuntu_files_two",
76
+
name='ubuntu_config',
69
77
srcs= [
70
78
":ubuntu_flat",
71
79
":ubuntu_files",
@@ -90,20 +98,26 @@ container_config(
90
98
"443",
91
99
],
92
100
)
93
-
# CLOUDSDK_CONFIG has to point to the real $HOME/.config/gcloud directory, otherwise push will fail: please sets HOME to the current build dir
94
-
# DOCKER_CONFIG has to point to a $HOME/.docker with configured docker credential/helper for gcr.io cases or some other auth completed already for private repos;
95
-
# if the docker-credential-gcloud is being used, it has to be symlinked into the limited PATH used by please - either /usr/local/bin or /usr/bin
101
+
102
+
# DESCRIPTION:
103
+
# * name Mandatory. The name of the rule; note that the rule will generate 2 separate rules, the one that does the push is called '${name}_push'; invoking just the name won't work
104
+
# * srcs Mandatory. The ORDERED list of layers that compose the image. Always start with the baseimage (if any), followed by smaller layers; the LAST one MUST be a previously defined "container_config" target.
105
+
# * image_name Optional. The name of the generated image; if absent, will use the ${name} field
106
+
# * tag Optional. Extra tag for the image. The rule uses by default 12 chars from the digest of the image and the $CI_COMMIT_TAG variable (if defined);
107
+
# REQUIREMENTS:
108
+
# * CLOUDSDK_CONFIG has to point to the real $HOME/.config/gcloud directory (by default), otherwise push will fail, since please sets $HOME to the current build dir
109
+
# * DOCKER_CONFIG has to point to a $HOME/.docker with configured docker credentials/helpers for private repos use-case;
110
+
# * any credential helper for docker has to be linked into /usr/local/bin or /usr/bin (e.g. docker-credential-gcloud)
96
111
container_push(
97
112
name='ubuntu_custom',
98
113
srcs= [
99
114
":ubuntu_flat",
100
115
":ubuntu_files",
101
116
":ubuntu_files_two",
102
-
":ubuntu_new",
117
+
":ubuntu_config",
103
118
],
104
-
image_name="foo", # optional, if you want image name to be different from the rule name
105
-
tag="foobarv2", # optional, will use the image digest (default) an $CI_COMMIT_TAG if defined; this one will the the 3rd
106
-
# repository = "gcr.io/tcn-cloud-dev/m", # optional, will use CONFIG.DEFAULT_DOCKER_REPO as default;
0 commit comments