Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building a qemu image with a JVM container doesn't work. #3923

Open
stijnopheide opened this issue Apr 28, 2023 · 0 comments
Open

Building a qemu image with a JVM container doesn't work. #3923

stijnopheide opened this issue Apr 28, 2023 · 0 comments

Comments

@stijnopheide
Copy link
Contributor

Description

Building a default qemu image with a JVM container doesn't work.

Steps to reproduce the issue:

kernel:
  image: linuxkit/kernel:5.10.104
  cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
  - linuxkit/init:14df799bb3b9e0eb0491da9fda7f32a108a2e2a5
  - linuxkit/runc:436357ce16dd663e24f595bcec26d5ae476c998e
  - linuxkit/containerd:eeb3aaf497c0b3f6c67f3a245d61ea5a568ca718
  - linuxkit/ca-certificates:4de36e93dc87f7ccebd20db616ed10d381911d32
onboot:
  - name: sysctl
    image: linuxkit/sysctl:e5959517fab7b44692ad63941eecf37486e73799
  - name: dhcpcd
    image: linuxkit/dhcpcd:2a8ed08fea442909ba10f950d458191ed3647115
    command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
  - name: getty
    image: linuxkit/getty:06f34bce0facea79161566d67345c3ea49965437
    env:
      - INSECURE=true
    binds.add:
      - /usr/bin/service:/usr/bin/service
  - name: temurin
    image: eclipse-temurin:8
    cwd: /app
    command: ["/bin/sh", "-c", "while /bin/true; do echo hello $(date); sleep 1; done" ]

Describe the results you received:

In the getty process:

(ns: getty) linuxkit-fa42adead3ca:~# ls /var/log/
getty.log      getty.out.log  onboot
(ns: getty) linuxkit-fa42adead3ca:~# service start temurin
Starting service: "temurin"
FATA[0000] failed to read service spec                   error="open /containers/services/temurin/config.json: no such file or directory" service=temurin
(ns: getty) linuxkit-fa42adead3ca:~# ls /containers/services/temurin/
lower
(ns: getty) linuxkit-fa42adead3ca:~#

So, by default the service does not start, and the error can be seen when manually starting the service.

Describe the results you expected:

temurin service is running when machine starts.

Additional information you deem important (e.g. issue happens only occasionally):

  • debug log of linuxkit -v build temurin
  • Trying the same thing with the Amazon Corretto amazoncorretto:8 image doesn't work either.
  • Any service defined after the JVM container doesn't end up in the /containers/services directory of the image.
  • It is possible to build an AWS image from the (slightly adapted) yml and run it on EC2.
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

No branches or pull requests

1 participant