Code Monkey home page Code Monkey logo

bootc-quarkus-optaplanner's Introduction

bootc-quarkus-optaplanner

Demo image

quay.io/jwesterl/bootc-quarkus-optaplanner:latest quay.io/jwesterl/bootc-quarkus-optaplanner:no-cloud-init

Built using,

podman build -f Containerfile.no-cloud-init -t quay.io/jwesterl/bootc-quarkus-optaplanner:no-cloud-init .
podman build -f Containerfile -t quay.io/jwesterl/bootc-quarkus-optaplanner:latest .
podman build --cap-add SYS_ADMIN -f Containerfile.systemd -t quay.io/jwesterl/bootc-quarkus-optaplanner:systemd

Use Image

To boot this I'll share 2 ways I've been using. I'm running Fedora 39 Silverblue on x86

First way is to use an netinstall iso and use anaconda and a kickstart file. Make sure to update the command with the correct path to your kickstart file / ISO.

virt-install --connect qemu:///system --name vm-name --memory 4096 --vcpus 2 --os-variant fedora-unknown --cdrom <path-to>/Fedora-Everything-netinst-x86_64-39-1.5.iso --video virtio --graphics spice --noautoconsole --disk size=10 --initrd-inject=<path-to>example.ks --extra-args "inst.ks=file:/example.ks" --location <path-to>/Fedora-Everything-netinst-x86_64-39-1.5.iso

In this git repo the example kickstart file installs the bootc-quarkus-optaplanner:no-cloud-init image and creates a user called jwesterl with password redhat and a public ssh key.

Second way, is by converting the container image to a qcow2 image and booting it using libvirt/kvm

Converting, using osbuild, https://github.com/osbuild/bootc-image-builder, create a config.json according to instructions then run,

sudo podman run \
    --rm \
    -it \
    --privileged \
    --pull=newer \
    --security-opt label=type:unconfined_t \
    -v $(pwd)/config.json:/config.json \
    -v $(pwd)/output:/output \
    quay.io/centos-bootc/bootc-image-builder:latest \
    --type qcow2 \
    --config /config.json \
    quay.io/jwesterl/bootc-quarkus-optaplanner:no-cloud-init

and then let's boot our image and inject some cloud-init data

virt-install --connect qemu:///system --name vm-name --memory 4096 --vcpus 2 --os-variant fedora-unknown --video virtio --graphics spice --noautoconsole --import --disk <path-to>/disk.qcow2

I've also tested running the bootc container "just as a normal container", So i added /usr/sbin/init as a CMD in the containerfile.systemd and run the container with:

podman run -ti --cap-add SYS_ADMIN --security-opt label=disable --device=/dev/fuse --rm quay.io/jwesterl/bootc-quarkus-optaplanner:systemd

It seems to work and I'm also able to "virt-install" this container image and get it to a running VM.

bootc-quarkus-optaplanner's People

Watchers

 avatar

bootc-quarkus-optaplanner's Issues

Base image reference need to be updated

The location of the base images have changed. Update the Containerfiles to reference the following locations:

  • quay.io/centos-boot/fedora-boot-cloud:eln -> quay.io/centos-bootc/fedora-bootc-cloud:eln
  • quay.io/centos-boot/fedora-tier-1:eln -> quay.io/centos-bootc/fedora-bootc:eln

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.