我已经用我用C编写的应用程序创建了docker映像,但是在运行映像之后,我列出了要检查的容器是否正在运行,但是没有容器在运行。我检查了我的机器/ var / logs / syslog,输出如下。知道为什么容器没有运行吗?
May 15 16:15:22 cumucore systemd-udevd[13471]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May 15 16:15:22 cumucore systemd-udevd[13471]: Could not generate persistent MAC address for veth5b3e62c: No such file or directory
May 15 16:15:22 cumucore systemd-udevd[13472]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May 15 16:15:22 cumucore systemd-udevd[13472]: Could not generate persistent MAC address for vetha16701d: No such file or directory
May 15 16:15:22 cumucore NetworkManager[942]: <info> [1589548522.9167] manager: (veth5b3e62c): new Veth device (/org/freedesktop/NetworkManager/Devices/33)
May 15 16:15:22 cumucore kernel: [ 2551.065424] docker0: port 1(vetha16701d) entered blocking state
May 15 16:15:22 cumucore kernel: [ 2551.065426] docker0: port 1(vetha16701d) entered disabled state
May 15 16:15:22 cumucore kernel: [ 2551.065480] device vetha16701d entered promiscuous mode
May 15 16:15:22 cumucore kernel: [ 2551.065545] docker0: port 1(vetha16701d) entered blocking state
May 15 16:15:22 cumucore kernel: [ 2551.065547] docker0: port 1(vetha16701d) entered forwarding state
May 15 16:15:22 cumucore NetworkManager[942]: <info> [1589548522.9181] manager: (vetha16701d): new Veth device (/org/freedesktop/NetworkManager/Devices/34)
May 15 16:15:22 cumucore kernel: [ 2551.071998] docker0: port 1(vetha16701d) entered disabled state
May 15 16:15:22 cumucore NetworkManager[942]: <info> [1589548522.9298] devices added (path: /sys/devices/virtual/net/vetha16701d, iface: vetha16701d)
May 15 16:15:22 cumucore NetworkManager[942]: <info> [1589548522.9298] device added (path: /sys/devices/virtual/net/vetha16701d, iface: vetha16701d): no ifupdown configuration found.
May 15 16:15:22 cumucore NetworkManager[942]: <info> [1589548522.9300] devices added (path: /sys/devices/virtual/net/veth5b3e62c, iface: veth5b3e62c)
May 15 16:15:22 cumucore NetworkManager[942]: <info> [1589548522.9301] device added (path: /sys/devices/virtual/net/veth5b3e62c, iface: veth5b3e62c): no ifupdown configuration found.
May 15 16:15:22 cumucore containerd[1313]: time="2020-05-15T16:15:22.945456746+03:00" level=info msg="shim containerd-shim started" address="/containerd-shim/moby/69402d9f19502efd82ac617dac339cdec3d2cabda5c16812c31791295924a9f3/shim.sock" debug=false pid=13487
May 15 16:15:23 cumucore kernel: [ 2551.265256] eth0: renamed from veth5b3e62c
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.1378] devices removed (path: /sys/devices/virtual/net/veth5b3e62c, iface: veth5b3e62c)
May 15 16:15:23 cumucore kernel: [ 2551.288428] IPv6: ADDRCONF(NETDEV_CHANGE): vetha16701d: link becomes ready
May 15 16:15:23 cumucore kernel: [ 2551.288499] docker0: port 1(vetha16701d) entered blocking state
May 15 16:15:23 cumucore kernel: [ 2551.288500] docker0: port 1(vetha16701d) entered forwarding state
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.1442] device (vetha16701d): carrier: link connected
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.1443] device (docker0): carrier: link connected
May 15 16:15:23 cumucore gnome-shell[2823]: Removing a network device that was not added
May 15 16:15:23 cumucore gnome-shell[1685]: Removing a network device that was not added
May 15 16:15:23 cumucore containerd[1313]: time="2020-05-15T16:15:23.362554120+03:00" level=info msg="shim reaped" id=69402d9f19502efd82ac617dac339cdec3d2cabda5c16812c31791295924a9f3
May 15 16:15:23 cumucore dockerd[2176]: time="2020-05-15T16:15:23.373360792+03:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
May 15 16:15:23 cumucore kernel: [ 2551.527646] docker0: port 1(vetha16701d) entered disabled state
May 15 16:15:23 cumucore kernel: [ 2551.527724] veth5b3e62c: renamed from eth0
May 15 16:15:23 cumucore systemd-udevd[13567]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.4353] manager: (veth5b3e62c): new Veth device (/org/freedesktop/NetworkManager/Devices/35)
May 15 16:15:23 cumucore kernel: [ 2551.584567] docker0: port 1(vetha16701d) entered disabled state
May 15 16:15:23 cumucore kernel: [ 2551.601086] device vetha16701d left promiscuous mode
May 15 16:15:23 cumucore kernel: [ 2551.601102] docker0: port 1(vetha16701d) entered disabled state
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.4927] devices added (path: /sys/devices/virtual/net/veth5b3e62c, iface: veth5b3e62c)
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.4927] device added (path: /sys/devices/virtual/net/veth5b3e62c, iface: veth5b3e62c): no ifupdown configuration found.
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.4929] devices removed (path: /sys/devices/virtual/net/veth5b3e62c, iface: veth5b3e62c)
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.4929] devices removed (path: /sys/devices/virtual/net/vetha16701d, iface: vetha16701d)
May 15 16:15:23 cumucore NetworkManager[942]: <info> [1589548523.4950] device (vetha16701d): released from master device docker0
May 15 16:15:23 cumucore gnome-shell[2823]: Removing a network device that was not added
May 15 16:15:23 cumucore gnome-shell[2823]: Removing a network device that was not added
May 15 16:15:23 cumucore gnome-shell[1685]: Removing a network device that was not added
May 15 16:15:23 cumucore gnome-shell[1685]: Removing a network device that was not added
下面也是我的Dokerfile内容
FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install -y locales tzdata \
&& apt-get -y install rsyslog \
&& apt-get -y install curl \
&& apt-get install net-tools \
&& apt-get install -y gnupg2 \
&& apt-get install -y software-properties-common \
&& apt-get install -y build-essential
RUN apt-get install libssl1.0.0
RUN apt-get install -y libssl-dev libmysqlclient-dev libsctp-dev libevent-dev
# Set the Current Working Directory inside the container
WORKDIR /app
# Copy the source from the current directory to the Working Directory inside the container
COPY . .
RUN make FOUR_D=true FIVE_D=true MYSQL=true
# Expose ports
EXPOSE 2123
EXPOSE 38412
# Command to run the executable
CMD ["./BIN_DATA/core"]
运行Dockerfile后产生Docker映像
REPOSITORY TAG IMAGE ID CREATED SIZE
amfapp latest f8d12a091f14 18 hours ago 552MB
ubuntu latest 1d622ef86b13 3 weeks ago 73.9MB