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
In some scenarios, build operations require credentials or other configuration data to access dependent resources, but it is undesirable for that information to be placed in source control. You can define input secrets and input config maps for this purpose.
11
+
[role="_abstract"]
12
+
To provide credentials and other configuration data to a build without placing them in source control, you can define input secrets and input config maps.
13
+
14
+
In some scenarios, build operations require credentials or other configuration data to access dependent resources. To make that information available without placing it in source control, you can define input secrets and input config maps.
Copy file name to clipboardExpand all lines: modules/builds-docker-strategy.adoc
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,9 @@ RUN chmod 755 /input_report.sh
26
26
CMD ["/bin/sh", "-c", "/input_report.sh"]
27
27
----
28
28
29
-
[NOTE]
29
+
[IMPORTANT]
30
30
====
31
31
Users normally remove their input secrets from the final application image so that the secrets are not present in the container running from that image. However, the secrets still exist in the image itself in the layer where they were added. This removal is part of the Dockerfile itself.
32
+
33
+
To prevent the contents of input secrets and config maps from appearing in the build output container images and avoid this removal process altogether, xref:../../cicd/builds/build-strategies.html#builds-using-build-volumes_build-strategies-docker[use build volumes] in your Docker build strategy instead.
Copy file name to clipboardExpand all lines: modules/builds-input-secrets-configmaps.adoc
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,11 @@
5
5
[id="builds-input-secrets-configmaps_{context}"]
6
6
= Input secrets and config maps
7
7
8
+
[IMPORTANT]
9
+
====
10
+
To prevent the contents of input secrets and config maps from appearing in build output container images, use build volumes in your xref:../../cicd/builds/build-strategies.html#builds-using-build-volumes_build-strategies-docker[Docker build] and xref:../../cicd/builds/build-strategies.html#builds-using-build-volumes_build-strategies-s2i[source-to-image build] strategies.
11
+
====
12
+
8
13
In some scenarios, build operations require credentials or other configuration data to access dependent resources, but it is undesirable for that information to be placed in source control. You can define input secrets and input config maps for this purpose.
9
14
10
15
For example, when building a Java application with Maven, you can set up a private mirror of Maven Central or JCenter that is accessed by private keys. To download libraries from that private mirror, you have to supply the
# OpenShift requires images to run as non-root by default
37
-
USER 1001
38
-
ENTRYPOINT ["/bin/bash"]
19
+
FROM registry.redhat.io/ubi8/ubi:latest
20
+
RUN dnf search kernel-devel --showduplicates && \
21
+
dnf install -y kernel-devel
39
22
----
40
-
<1> If adding Satellite configurations to builds using `enabled=1` fails, add `RUN sed -i".org" -e "s#^enabled=1#enabled=0#g" /etc/yum/pluginconf.d/subscription-manager.conf` to the Dockerfile.
Docker builds normally create a layer representing each instruction in a Dockerfile. Setting the `imageOptimizationPolicy` to `SkipLayers` merges all instructions into a single layer on top of the base image.
0 commit comments