[Podman] Re: How to build image for own jar file
by Александр Илюшкин
Usually, a GUI application is downloaded to a local computer and
configured to communicate with services over the network.
Since this turned out to be inconvenient, instead of making GUI
applications, people usually make web applications, available through
a browser.
They can be put into a docker container and made accessible by opening
a port through the EXPOSE instruction.
https://thelinuxcode.com/dockerfile_expose_ports/#:~:text=A%20web%20serve...
вт, 5 дек. 2023 г. в 09:06, Thomas <t.schneider(a)getgoogleoff.me>:
>
> Understood.
>
> But what is the solution then to deploy this application?
>
>
> Am 05.12.23 um 06:34 schrieb Александр Илюшкин:
>
> TLDR: You will not be able to run graphical applications in containers.
>
> What do you expect to see as a result of launching the gui application? There is no graphics system in alpine by default, even if you add it there, the graphics window somehow needs to be displayed on your local machine, this will require certain settings to broadcast the graphics system over the network.
>
> containers usually contain services that are accessible over the network through an open network port
>
> С уважением, А. И.
>
> пн, 4 дек. 2023 г., 21:34 Thomas <t.schneider(a)getgoogleoff.me>:
>>
>> Hello,
>>
>> I need more guidance on this task, and I think one should restart from
>> scratch.
>> This java app "masterpassword-gui" is obviously a graphical frontend,
>> but I think I didn't reflect this in my dockerfile.
>>
>> Currently I'm using this dockerfile to build the image:
>> # Filename: mpw-gui
>> FROM alpine:latest
>> RUN apk add openjdk17-jre-headless openjdk17-jre
>> COPY files/masterpassword-gui.jar
>> /home/thomas/Software/masterpassword-gui.jar
>> CMD ["java", "-jar", "/home/thomas/Software/masterpassword-gui.jar"]
>>
>> tree /home/thomas/Software/container/mpg-gui/
>> Software/container/mpg-gui/
>> ├── Dockerfile
>> └── files
>> └── masterpassword-gui.jar
>>
>> 1 directories, 2 files
>>
>> The build is successful, but running the container fails.
>>
>> Could you please advise how to complete this task?
>>
>> THX
>>
>>
>> Am 28.11.23 um 05:20 schrieb Александр Илюшкин:
>> > Hi, mate.
>> >
>> > I believe you can use this answer on SO
>> > https://stackoverflow.com/a/35062090 replacing `docker` with `podman`
>> > as it fully supports docker API.
>> >
>> > So I would write a file named `Dockerfile`:
>> >
>> > FROM openjdk:11
>> > MAINTAINER t.schneider(a)getgoogleoff.me
>> > COPY~/.mpw-gui/masterpassword-gui.jar /home/masterpassword-gui.jar
>> > CMD ["java","-jar","/home/masterpassword-gui.jar"]
>> >
>> > Notice that I used FROM openjdk:11, you don't have to build your own
>> > separate openjdk image as it's already built by guys from openjdk,
>> > please use your current project version of JDK for it:
>> > https://hub.docker.com/_/openjdk
>> >
>> > Build your image:
>> >
>> > podman build -t imageName .
>> >
>> > Now invoke your program inside a container:
>> >
>> > podman run --name myProgram imageName
>> >
>> > Now restart your program by restarting the container:
>> >
>> > podman restart myProgram
>> >
>> > Your program changed? Rebuild the image!:
>> >
>> > podman rmi imageName
>> > podman build -t imageName .
>> >
>> > Additionally, usually we don't build images by hand, we use maven or
>> > gradle for this.
>> >
>> > For instance, google created a tool called JIB, which creates OCI
>> > images with java programs automatically:
>> > https://cloud.google.com/java/getting-started/jib
>> >
>> > Also, we use this maven plugin to build docker image with jar file of
>> > our project without writing Dockerfile at all: https://dmp.fabric8.io/
>> >
>> > It should work the same way with both docker and podman.
>> >
>> > вт, 28 нояб. 2023 г. в 02:02, Thomas <t.schneider(a)getgoogleoff.me>:
>> >> Hello,
>> >>
>> >> I have successfully build docker image "sapmachine", a build of OpenJDK.
>> >>
>> >> Now I want to build my own image to run my own jar file.
>> >> This jar file is located in ~/.mpw-gui/masterpassword-gui.jar, and with
>> >> locally installed OpenJDK I would run this command: java -jar
>> >> .mpw-gui/masterpassword-gui.jar
>> >>
>> >> Could you please advise how to build my own image for this java application?
>> >>
>> >> THX
>> >> _______________________________________________
>> >> Podman mailing list -- podman(a)lists.podman.io
>> >> To unsubscribe send an email to podman-leave(a)lists.podman.io
>> >
>> >
>>
>
--
С уважением,
А.И.
1 year, 5 months
[Podman] Re: podman slowly shows logs on windows
by Jason Greene
Hey Александр,
Do you see a difference when you run this on the WSL prompt? If you do "wsl
-d podman-machine-default”, then podman logs <container>?
On Jul 21, 2023 at 2:19:01 PM, Daniel Walsh <dwalsh(a)redhat.com> wrote:
> On 7/21/23 02:54, Александр Илюшкин wrote:
>
> Hey guys, I've switched from docker to podman and I noticed that command
>
>
> podman logs <container name> works extremely slow
>
>
> What should be done to fix this?
>
>
> I guess we would need to know what extremely slow means.
>
> Jason, any ideas?
>
>
1 year, 10 months
[Podman] Re: How to build image for own jar file
by Александр Илюшкин
Thanks, Michael.
Yeah, so to summarize everything
1. Decide, whether you have an option to rewrite your gui app to webapp, or
your only option is gui.
2. For gui deployment in podman, you have to add additional graphical
libraries for Linux, install them inside your dockerfile.
3. Google for articles of how to use graphical environment inside a docker
container, this, for instance:
https://sgrgyanchandani.medium.com/gui-inside-centos-docker-container-df4...
С уважением, А. И.
вт, 5 дек. 2023 г., 14:12 Michael Traxler <M.Traxler(a)gsi.de>:
> Hello,
>
> I have to say that I run many graphical applications via podman and this
> saves
> my a...
> The problem are for example CAD-software vendors. Their (very powerful and
> expensive) software *only* runs on e.g. RHEL7.
> Then containers are your saviour!
> Just use the centos7 container and "yum" the needed packages for a
> graphical
> system and your in business (while keeping your desktop machine bleeded
> edge).
> Much less overhead than a full virtual machine.
>
> I love podman and the possibility to also run graphical applications in
> them.
> (normally in a vnc-server, as vnc is also such a great tool to improve your
> life).
>
> Viele Grüße
>
> Michael
>
> ---------------------------------------
>
> On Tue, 5 Dec 2023, Александр Илюшкин wrote:
>
> > TLDR: You will not be able to run graphical applications in containers.
> >
> > What do you expect to see as a result of launching the gui application?
> > There is no graphics system in alpine by default, even if you add it
> there,
> > the graphics window somehow needs to be displayed on your local machine,
> > this will require certain settings to broadcast the graphics system over
> > the network.
> >
> > containers usually contain services that are accessible over the network
> > through an open network port
> >
> > С уважением, А. И.
> >
> > пн, 4 дек. 2023 г., 21:34 Thomas <t.schneider(a)getgoogleoff.me>:
> >
> >> Hello,
> >>
> >> I need more guidance on this task, and I think one should restart from
> >> scratch.
> >> This java app "masterpassword-gui" is obviously a graphical frontend,
> >> but I think I didn't reflect this in my dockerfile.
> >>
> >> Currently I'm using this dockerfile to build the image:
> >> # Filename: mpw-gui
> >> FROM alpine:latest
> >> RUN apk add openjdk17-jre-headless openjdk17-jre
> >> COPY files/masterpassword-gui.jar
> >> /home/thomas/Software/masterpassword-gui.jar
> >> CMD ["java", "-jar", "/home/thomas/Software/masterpassword-gui.jar"]
> >>
> >> tree /home/thomas/Software/container/mpg-gui/
> >> Software/container/mpg-gui/
> >> ├── Dockerfile
> >> └── files
> >> └── masterpassword-gui.jar
> >>
> >> 1 directories, 2 files
> >>
> >> The build is successful, but running the container fails.
> >>
> >> Could you please advise how to complete this task?
> >>
> >> THX
> >>
> >>
> >> Am 28.11.23 um 05:20 schrieb Александр Илюшкин:
> >>> Hi, mate.
> >>>
> >>> I believe you can use this answer on SO
> >>> https://stackoverflow.com/a/35062090 replacing `docker` with `podman`
> >>> as it fully supports docker API.
> >>>
> >>> So I would write a file named `Dockerfile`:
> >>>
> >>> FROM openjdk:11
> >>> MAINTAINER t.schneider(a)getgoogleoff.me
> >>> COPY~/.mpw-gui/masterpassword-gui.jar /home/masterpassword-gui.jar
> >>> CMD ["java","-jar","/home/masterpassword-gui.jar"]
> >>>
> >>> Notice that I used FROM openjdk:11, you don't have to build your own
> >>> separate openjdk image as it's already built by guys from openjdk,
> >>> please use your current project version of JDK for it:
> >>> https://hub.docker.com/_/openjdk
> >>>
> >>> Build your image:
> >>>
> >>> podman build -t imageName .
> >>>
> >>> Now invoke your program inside a container:
> >>>
> >>> podman run --name myProgram imageName
> >>>
> >>> Now restart your program by restarting the container:
> >>>
> >>> podman restart myProgram
> >>>
> >>> Your program changed? Rebuild the image!:
> >>>
> >>> podman rmi imageName
> >>> podman build -t imageName .
> >>>
> >>> Additionally, usually we don't build images by hand, we use maven or
> >>> gradle for this.
> >>>
> >>> For instance, google created a tool called JIB, which creates OCI
> >>> images with java programs automatically:
> >>> https://cloud.google.com/java/getting-started/jib
> >>>
> >>> Also, we use this maven plugin to build docker image with jar file of
> >>> our project without writing Dockerfile at all: https://dmp.fabric8.io/
> >>>
> >>> It should work the same way with both docker and podman.
> >>>
> >>> вт, 28 нояб. 2023 г. в 02:02, Thomas <t.schneider(a)getgoogleoff.me>:
> >>>> Hello,
> >>>>
> >>>> I have successfully build docker image "sapmachine", a build of
> OpenJDK.
> >>>>
> >>>> Now I want to build my own image to run my own jar file.
> >>>> This jar file is located in ~/.mpw-gui/masterpassword-gui.jar, and
> with
> >>>> locally installed OpenJDK I would run this command: java -jar
> >>>> .mpw-gui/masterpassword-gui.jar
> >>>>
> >>>> Could you please advise how to build my own image for this java
> >> application?
> >>>>
> >>>> THX
> >>>> _______________________________________________
> >>>> Podman mailing list -- podman(a)lists.podman.io
> >>>> To unsubscribe send an email to podman-leave(a)lists.podman.io
> >>>
> >>>
> >>
> >>
> >
1 year, 5 months
[Podman] Re: I am not able to install gpgme on RHEL 9
by Josh Boyer
On Wed, Feb 1, 2023 at 7:47 PM adhish meena <adhishmeena877(a)gmail.com> wrote:
>
> Hi team,
>
> Currently I am using RHEL 9.
> I have been trying to setup dev env of podman on my pc but I am not able to install gpgme-devel.
gpgme-devel is provided in the
codeready-builder-for-rhel-9-x86_64-rpms repository on RHEL 9. Make
sure you have that enabled.
josh
> could you please suggest how shall I resolve this?
>
> Regards
> Adhish Meena
> _______________________________________________
> Podman mailing list -- podman(a)lists.podman.io
> To unsubscribe send an email to podman-leave(a)lists.podman.io
2 years, 3 months
[Podman] Re: How does podman "initialize" after a reboot?
by Александр Илюшкин
I also noticed that podman-machine does not start after reboot, I have
to start it manually.
There is also a bug fixed in 4.6 version.
https://github.com/containers/podman/pull/18328
https://github.com/containers/podman/issues/16945
Check status of podman machine after reboot using this command
podman machine list
чт, 3 авг. 2023 г. в 08:57, Pratham Patel <thefirst1322(a)gmail.com>:
>
> **Any** discussions--including me being an idot and not understanding
> things--are welcome. Please comment/reply so I can understand what is
> happening! :)
>
>
> - Pratham Patel
> _______________________________________________
> Podman mailing list -- podman(a)lists.podman.io
> To unsubscribe send an email to podman-leave(a)lists.podman.io
--
С уважением,
А.И.
1 year, 10 months
[Podman] podman systemd file for mssql-server
by mwindham@troglobytor.com
I did another generate today and after some tinkering with options got the
below, and I don't have a clue what went wrong in original post.
sudo podman generate systemd -n -f --restart-policy=always sqlx22
>pdm2sysd.txtsudo cp container-sqlx22.service /etc/systemd/system
sudo systemctl enable container-sqlx22.service
works
# container-sqlx22.service
# autogenerated by Podman 4.2.0
# Tue Jan 24 17:00:30 CST 2023
[Unit]
Description=Podman container-sqlx22.service
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=/run/containers/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=always
TimeoutStopSec=70
ExecStart=/usr/bin/podman start sqlx22
ExecStop=/usr/bin/podman stop -t 10 sqlx22
ExecStopPost=/usr/bin/podman stop -t 10 sqlx22
PIDFile=/run/containers/storage/overlay-containers/afcbd216eedb0d74075a522e8
fc6cfc5a8dc8a0a3dfb2ce65434891b30fb0eb8/userdata/conmon.pid
Type=forking
[Install]
WantedBy=default.target
2 years, 4 months
[Podman] Re: Announcement: New Podman pre-release - v4.7.0-rc1
by Neal Gompa
On Fri, Sep 15, 2023 at 7:40 PM Tom Sweeney <tom.sweeney(a)redhat.com> wrote:
>
> > means of stitching Podman instances across machines together on the roadmap?
>
> Not that I know of at this point, but just in case I'm not thinking about the right thing, could you expound a little bit more on what "stiching Podman instances" would mean in your thinking?
>
I'm thinking more along the lines of being able to have Podman deploy
run containers/pods/etc. across different machines and centrally
manage them from a single interface. Particularly where I've got a
main x86 node and a bunch of crappy ARM SBCs to run stuff on.
--
真実はいつも一つ!/ Always, there's only one truth!
1 year, 8 months
[Podman] Re: Deprecation announcement for CNI plugins
by Anders F Björklund
Currently it is using Podman 3.4.2, due to still using Ubuntu 20.04...
There were some ugly crashes with that when rebuilt with go1.19, so the ISO
(only) is being updated to 3.4.7 (end of the line?).
/Anders
Den tis 10 jan. 2023 kl 20:59 skrev Daniel Walsh <dwalsh(a)redhat.com>:
> Also didn't want to add a Rust toolchain. But for now using Podman 3.4
> will work for a while yet, and I guess it is inevitable considering
> conmon-rs....
>
> We are not dropping CNI right away, we are just announcing it so that we
> don't need to ship it in RHEL10 and Fedora 39. So Podman 4.4 and later
> will continue to have CNI support for a while yet.
>
>
>
2 years, 4 months
[Podman] Re: --dns=ipaddr - no effect of it
by lejeczek
On 30/05/2023 15:38, Paul Holzinger wrote:
> This was a bug in 4.4 I think, you need to update to
> podman v4.5
> (https://github.com/containers/podman/issues/17499).
>
> If you use a network with dns enabled we will now always
> use the aardvark-dns resolver in resolv.conf and then
> aardvark-dns forwards to the correct --dns ip when the
> query was not a container name.
>
> Paul
>
> On Tue, May 30, 2023 at 3:32 PM Daniel Walsh
> <dwalsh(a)redhat.com> wrote:
>
> On 5/30/23 09:14, lejeczek via Podman wrote:
>>
>>
>> On 30/05/2023 14:00, Daniel Walsh wrote:
>>> On 5/29/23 05:59, lejeczek via Podman wrote:
>>>> Hi guys.
>>>>
>>>> --dns=none renders what expected but with an actual
>>>> server, say: --dns=10.3.1.200
>>>> resolve.conf seems to be the one of the host's, as
>>>> if --dns did not happen.
>>>> Can anybody else say that is the case? Am I missing
>>>> something?
>>>> I'm on Centos 9 stream with all bits up-to-date.
>>>> many thanks, L.
>>>>
>>>> _______________________________________________
>>>> Podman mailing list --podman(a)lists.podman.io
>>>> To unsubscribe send an email topodman-leave(a)lists.podman.io
>>>
>>> Here is what I am getting?
>>>
>>> ```
>>> # podman run --dns=10.3.1.200 alpine cat
>>> /etc/resolv.conf
>>> nameserver 10.3.1.200
>>> # podman run --dns=none alpine cat /etc/resolv.conf
>>> cat: can't open '/etc/resolv.conf': No such file or
>>> directory
>>> ```
>>>
>>> Rootless
>>>
>>> ```
>>> $ podman run --dns=10.3.1.200 alpine cat
>>> /etc/resolv.conf
>>> nameserver 10.3.1.200
>>> $ podman run --dns=none alpine cat /etc/resolv.conf
>>> cat: can't open '/etc/resolv.conf': No such file or
>>> directory
>>> ```
>>>
>> I'm trying, for production setup, Centos 9 (perhaps
>> all official, available versions?)
>>
>> podman run -dt --network=off-host --ip=${_IP}
>> --dns=10.3.1.200 --hostname ${_H}.${_DOM} --name
>> ${_NAME} localhost/centos9-mine
>> ...
>> [root@centos-whale /]# cat /etc/resolv.conf
>> search mine.priv mszczonow.vectranet.pl
>> <http://mszczonow.vectranet.pl>
>> nameserver 10.3.1.254
>> nameserver 89.228.4.126
>> nameserver 31.11.173.2
>> nameserver 10.1.1.254
>> options timeout:1
>>
>> that 'resolv.conf' is an exactl copy off the host, this:
>>
>> podman run -dt --network=off-host --ip=${_IP}
>> --dns=none --hostname ${_H}.${_DOM} --name ${_NAME}
>> localhost/centos9-mine
>>
>> [root@centos-whale /]# cat /etc/resolv.conf
>> # Generated by NetworkManager
>> nameserver 192.168.122.1
>>
>> Perhaps the issue(s) is with centos?
>> centos9-mine is done off the 'quay.io/centos/centos
>> <http://quay.io/centos/centos>' with only a couple
>> add rpm packages.
>>
Is it in the pipeline for rhel/centos already or yet far
away so that local source/rpm rebuild is a must? Would
you/anybody know?
many thanks, L.
2 years
[Podman] Re: Podman Community Cabal Meeting - Thur May 18, 2023, 11:00 a.m. EDT (UTC-5)
by Tom Sweeney
Apologies for the double ping on this. I just noted that I'd the wrong
date in the body of the email. The Subject line is correct, it is Thurs
May 18, not the 19th.
t
On 5/17/23 11:23, Tom Sweeney wrote:
>
> Hi All,
>
> A quick reminder that the Podman Cabal meeting will be happening in
> just under 24 hours from now, at 11:00am EDT (UTC-5) on Thu May 19. We
> will be talking about Storage layers, containersh, http://podman.io
> <https://t.co/R5FbTKrfcV>revamp, and the Containers AppStore. Agenda
> w/ conference link: https://hackmd.io/gQCfskDuRLm7iO
> <https://t.co/sYgIaGmACk>
>
> Hope to see you there!
>
> t
>
2 years