Open csnyder616 opened 6 years ago
@rhuss : I looked up in documentation but seems like we don't have any option to set pull secret(only authentication via SSL/certificates). Do you think we should also provide this option??
Yes, I think, too, that we don't have support for secrets for the S2I mode.
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
I think you can use fabric8.build.pullSecret
property
We did some fixes on JKube to make this work.
There's a quickstart demonstrating how to accomplish this in a Quarkus-based project: https://github.com/eclipse/jkube/tree/master/quickstarts/maven/quarkus-customized-image
Due to new docker rate limit, I tied to set openshiftPullSecret
to authenticate to dockerhub but no effect on the generated build config
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<configuration>
<verbose>true</verbose>
<buildStrategy>docker</buildStrategy>
<openshiftPullSecret>myPullSecret</openshiftPullSecret>
<buildRecreate>all</buildRecreate>
<recreate>true</recreate>
<resources>
<openshiftBuildConfig>
<limits>
<cpu>500m</cpu>
<memory>1Gi</memory>
</limits>
</openshiftBuildConfig>
<labels>
<all>
<app>${project.artifactId}</app>
</all>
</labels>
</resources>
<images>
<image>
<name>${project.artifactId}</name>
<alias>spring-boot</alias>
<build>
<contextDir>${project.basedir}/src/main/docker</contextDir>
<optimise>true</optimise>
<ports>
<port>8080</port>
<port>8778</port>
<port>9779</port>
</ports>
<assembly>
<descriptorRef>artifact</descriptorRef>
</assembly>
<user>1000</user>
</build>
</image>
</images>
<enricher>
<config>
<f8-healthcheck-spring-boot>
<timeoutSeconds>5</timeoutSeconds>
</f8-healthcheck-spring-boot>
</config>
</enricher>
</configuration>
<executions>
<execution>
<id>all</id>
<goals>
<goal>resource</goal>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>undeploy</id>
<phase>prepare-package</phase>
<goals>
<goal>undeploy</goal>
</goals>
<configuration>
<failOnError>false</failOnError>
</configuration>
</execution>
</executions>
</plugin>
Expected buid config
spec:
serviceAccount: builder
source:
type: Binary
binary: {}
strategy:
type: Docker
dockerStrategy:
from:
kind: DockerImage
name: 'fabric8/java-alpine-openjdk11-jdk:1.8.1'
pullSecret:
name: myPullSecret
but was
spec:
serviceAccount: builder
source:
type: Binary
binary: {}
strategy:
type: Docker
dockerStrategy:
from:
kind: DockerImage
name: 'fabric8/java-alpine-openjdk11-jdk:1.8.1'
Yes, when implementing this for JKube, there were a few bugs solved, that probably prevented this from working on FMP. Is it possible for you to migrate and use JKube instead?
Description
We have an enterprise Docker registry that requires authentication for pulling images. I'm trying to build a project that uses one of our enterprise base images in the FROM block, so I need to change the pull secret in the build-config. I've figured out how to do this on the command-line:
Is there a way for me to set the pull secret using the Fabric8 Maven plugin? I'm fine with continuing to create the secret within OpenShift manually (in fact, that's probably preferable for me), but I'd like to be able to tell it which secret to use.
Info
mvn -v
) :