Skip to content

Add a build-image command to build a container image from a WildFly installation#705

Draft
jmesnil wants to merge 1 commit intowildfly:mainfrom
jmesnil:build_image
Draft

Add a build-image command to build a container image from a WildFly installation#705
jmesnil wants to merge 1 commit intowildfly:mainfrom
jmesnil:build_image

Conversation

@jmesnil
Copy link
Copy Markdown
Member

@jmesnil jmesnil commented Jun 25, 2024

Add JIB as a dependency to build the image (docker or podman are not required).

  • --name -> required parameter to specify the name of the container image
  • --dir -> optional parameter to specify the installation directory. if absent, search in the parents directory for an installation
  • --runtime-version -> optional parameter to specify the tag of the WildFly runtime image (default is latest)
  • --user / --password -> optional credentials to push the image to a container registry

…nstallation

Add JIB as a dependency to build the image (docker or podman are not required).

* --name -> required parameter to specify the name of the container image
* --dir -> optional parameter to specify the installation directory.
  if absent, search in the parents directory for an installation
* --runtime-version -> optional parameter to specify the tag of the
  WildFly runtime image (default is latest)
* --user / --password -> optional credentials to push the image to a container registry

Signed-off-by: Jeff Mesnil <jmesnil@redhat.com>
@jmesnil
Copy link
Copy Markdown
Member Author

jmesnil commented Jun 25, 2024

@spyrkob That's something I tried this morning to get an idea of what it would take to have prospero being able to produce a container image from an installation.

It's as simple as:

./prospero install --dir my-wildfly --profile wildfly
./prospero build-image --dir=my-wildfly --name=quay.io/jmesnil/my-wildfly-app --user=jmesnil --password=$QUAY_PASSWORD

And that's it, you can then run the image with podman run -p 8080:8080 quay.io/jmesnil/my-wildfly-app

@spyrkob
Copy link
Copy Markdown
Collaborator

spyrkob commented Jun 26, 2024

Nice :)

Do you see more cloud/image related tasks added to prospero? If so it might make sense to create a sub-command to organise them.

@jmesnil
Copy link
Copy Markdown
Member Author

jmesnil commented Jun 27, 2024

I did not thoroughly thought about it but you're making a good point image build instead of build-image would be more consistent with other commands/subcommands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants