Build, Run, Deploy from Source

  • Get the source code for the spring-client app, and remove the Jenkinsfile from root,

$ git clone https://github.com/remkohdev/spring-client.git
$ cd spring-client
$ mkdir Jenkins
$ mv Jenkinsfile Jenkins
  • Download the builder image for Java,

  • You can use the private registry,

$ cd ~/dev/src/projects/spring-client
$ echo 'passw0rd' | docker login https://registry.redhat.io -u remkohdev --password-stdin
$ docker pull registry.redhat.com/redhat-openjdk-18/openjdk18-openshift
  • Or the public registry,

$ docker pull registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift
  • Build the image from source,

$ s2i build . registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift s2i-spring-client
$ docker images
REPOSITORY    TAG    IMAGE ID    CREATED    SIZE
s2i-spring-client    latest    4809340c9b4b    57 seconds ago    583MB
registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift   latest    74c8511ec481    5 weeks ago    480MB
  • Docker run the spring-client,

  • Test,

  • Deploy to OpenShift,

Last updated

Was this helpful?