Skip to content

can not get the container's journal information on the host, using journalctl. #106

@0x0916

Description

@0x0916

I created a container image based on a Dockerfile like the following:

cat Dockerfile
FROM fedora:latest
ENV container docker
RUN yum -y update && yum -y install httpd && yum clean all
RUN systemctl mask dnf-makecache.timer && systemctl enable httpd
CMD [ "/sbin/init" ]

Then execute the following commands

# systemctl status systemd-machined.service 
● systemd-machined.service - Virtual Machine and Container Registration Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-machined.service; static; vendor preset: disabled)
   Active: active (running) since Mon 2018-10-29 11:15:25 +08; 28s ago
     Docs: man:systemd-machined.service(8)
           http://www.freedesktop.org/wiki/Software/systemd/machined
 Main PID: 2577 (systemd-machine)
   Status: "Processing requests..."
    Tasks: 1
   Memory: 424.0K
   CGroup: /system.slice/systemd-machined.service
           └─2577 /usr/lib/systemd/systemd-machined

Oct 29 11:15:25 localhost.localdomain systemd[1]: Starting Virtual Machine and Container Registration Service...
Oct 29 11:15:25 localhost.localdomain systemd[1]: Started Virtual Machine and Container Registration Service.
Oct 29 11:15:25 localhost.localdomain systemd-machined[2577]: New machine 6c4741198c33df0e25ecbff31fa9634f.
# cat /etc/oci-register-machine.conf 
# Disable oci-register-machine by setting the disabled field to true
disabled : false
# docker build -t httpd .
# docker run -tid --stop-signal=RTMIN+3 httpd

But I can not get the container's journal information on the host, using journalctl.

# machinectl list
MACHINE                          CLASS     SERVICE
6c4741198c33df0e25ecbff31fa9634f container docker 

1 machines listed.
# journalctl -M 6c4741198c33df0e25ecbff31fa9634f
No journal files were found.
-- No entries --

Any ideas are welcome.


my docker version is:

# docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-75.git8633870.el7.centos.x86_64
 Go version:      go1.9.4
 Git commit:      8633870/1.13.1
 Built:           Fri Sep 28 19:45:08 2018
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-75.git8633870.el7.centos.x86_64
 Go version:      go1.9.4
 Git commit:      8633870/1.13.1
 Built:           Fri Sep 28 19:45:08 2018
 OS/Arch:         linux/amd64
 Experimental:    false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions