-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Help getting Oracle Linux guest running #4969
Comments
Issue Overview For example, using the following Dockerfile, I am unable to get a TTY: FROM mysql:8.4-oraclelinux9
RUN microdnf install -y systemd
RUN echo '[Service]' > /etc/systemd/system/fiddle.service \
&& echo 'ExecStart=/fiddle.sh' >> /etc/systemd/system/fiddle.service \
&& echo '[Install]' >> /etc/systemd/system/fiddle.service \
&& echo 'WantedBy=default.target' >> /etc/systemd/system/fiddle.service \
&& systemctl enable fiddle
RUN echo '[Service]' > /etc/systemd/system/mysqld.service \
&& echo 'ExecStart=/usr/sbin/mysqld --user=root --skip-networking --daemonize' >> /etc/systemd/system/mysqld.service \
&& echo '[Install]' >> /etc/systemd/system/mysqld.service \
&& echo 'RequiredBy=fiddle.service' >> /etc/systemd/system/mysqld.service \
&& systemctl enable mysqld
RUN echo ttyS0 > /etc/securetty
RUN microdnf clean all
RUN echo "root:Docker!" | chpasswd
ENTRYPOINT ["bash"] With modifications, I managed to get a login prompt, but encountered a "no login shell" error. Here's the updated Dockerfile: FROM mysql:8.4-oraclelinux9
RUN microdnf install -y systemd
RUN echo '[Service]' > /etc/systemd/system/fiddle.service \
&& echo 'ExecStart=/fiddle.sh' >> /etc/systemd/system/fiddle.service \
&& echo '[Install]' >> /etc/systemd/system/fiddle.service \
&& echo 'WantedBy=default.target' >> /etc/systemd/system/fiddle.service \
&& systemctl enable fiddle
RUN echo '[Service]' > /etc/systemd/system/mysqld.service \
&& echo 'ExecStart=/usr/sbin/mysqld --user=root --skip-networking --daemonize' >> /etc/systemd/system/mysqld.service \
&& echo '[Install]' >> /etc/systemd/system/mysqld.service \
&& echo 'RequiredBy=fiddle.service' >> /etc/systemd/system/mysqld.service \
&& systemctl enable mysqld
RUN echo ttyS0 > /etc/securetty \
&& echo '[Service]' > /etc/systemd/system/mygetty.service \
&& echo 'ExecStart=/usr/sbin/agetty -L 9600 ttyS0 vt102' >> /etc/systemd/system/mygetty.service \
&& echo '[Install]' >> /etc/systemd/system/mygetty.service \
&& echo 'RequiredBy=fiddle.service' >> /etc/systemd/system/mygetty.service \
&& systemctl enable mygetty
RUN microdnf clean all
RUN echo "root:Docker!" | chpasswd
ENTRYPOINT ["bash"] Steps to Build the Root Filesystem DOCKER_BUILDKIT=1 docker build -t dummy - < DOCKERFILE
dd if=/dev/zero bs=1M count=1000 > rootfs.ext4
mkfs.ext4 rootfs.ext4
mount -o loop rootfs.ext4 mnt
docker run --rm -ti -v mnt:/my-rootfs dummy
for d in bin etc home lib lib64 opt root sbin usr dev run var; do tar c "/$d" | tar x -C /my-rootfs; done
for dir in proc sys; do mkdir /my-rootfs/${dir}; done
exit Current Status |
Your issue seems related to how the login shell is being set up and the configuration of 1. No Login ShellThe Fix:Ensure RUN echo 'root:x:0:0:root:/root:/bin/bash' > /etc/passwd
RUN echo 'ttyS0' > /etc/securetty The 2.
|
I use firecracker for many of the database backends on db<>fiddle, which has been working fine for years. I can run Debian and even Alpine guests but I've always had trouble with RHEL clones like Oracle Linux.
They boot ok but don't let me log in - with this dockerfile I get stuck without a tty:
and today I finally got a login prompt for the first time, but logging in a 'no login shell' error with this dockerfile:
in both cases I'm building the rootfs like this:
Is there something obvious I'm doing wrong? I'm really keen to add later versions of MySQL to dbfiddle but the official docker images are all Oracle Linux based since 8.0.
The text was updated successfully, but these errors were encountered: