Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
add image registry reference to https://dmp.fabric8.io/#registry (#1085)
Browse files Browse the repository at this point in the history
* add image registry reference to https://dmp.fabric8.io/#registry

* add how to set DOCKER_USERNAME & DOCKER_PASSWORD

* add IMPORTANT
  • Loading branch information
michael-read authored Aug 23, 2021
1 parent e7a89e2 commit 2f90cd0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
<image>
<name>%a:%v</name>
<registry>docker.io/${docker.username}</registry>
<!--
To use a different image registry, you can make the desired changes to the
<registry> subelement above. For more information, please see https://dmp.fabric8.io/#registry.
-->
<build>
<from>adoptopenjdk/openjdk8:alpine</from>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,27 @@ To deploy your application to a cluster you instead need the following steps:
[start=3]
. `docker:build` to build the docker images
. `cloudflow:push-images` to push the images to a Docker registry, returning information about the published image digests

NOTE: If not specifically configured in your POM, the default image registry used by the http://dmp.fabric8.io/[fabric8 docker-maven-plugin] is *_docker.io_*. To use a different registry, you’ll need to provide a proper <registry> subelement to your configuration. For more information, please see https://dmp.fabric8.io/#registry[Registry handling].

[start=5]
. `cloudflow:build-app` to produce the deployable CR file in the `topLevel` project `target` directory

== Full example
A full example of using the Maven commands is shown below:

A full example of Maven commands is shown below:
. Set the $DOCKER_USERNAME and $DOCKER_PASSWORD environment variables to the username and password of your image registry.
+
IMPORTANT: To avoid storing your credentials in the shell’s history file, use the following commands to create an environment variable for username and password. The username/password are your credentials to the Lightbend docker repository - commercial-registry.lightbend.com). If you want to see the password, remove the -s (for silent) flag.
+
[source,bash]
----
read DOCKER_USERNAME
read -s DOCKER_PASSWORD
----

. Then execute the following:
+
[source,bash]
----
mvn clean
Expand All @@ -57,8 +72,8 @@ mvn \
mvn cloudflow:build-app
----

After executing the above maven commands, you are ready to deploy your application to a cluster using:

. After executing the above maven commands, you are ready to deploy your application to a cluster using:
+
[source,bash]
----
kubectl cloudflow deploy ./target/<your-application-name>.json
Expand Down

0 comments on commit 2f90cd0

Please sign in to comment.