The docker export container cannot be run after being imported. An error is reported: error response from daemon: no command specified
According to the error message, the command can be run without specifying the command
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/ubuntu latest fb52e22af1b0 3 weeks ago 72.8 MB
[root@localhost ~]# docker run -itd docker.io/ubuntu:latest
7ce403eba8d89127395e057eb4d6cf7eb2374e40214ce6575a29e755b707ca23
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7ce403eba8d8 docker.io/ubuntu:latest "bash" 4 seconds ago Up 3 seconds hungry_babbage
[root@localhost ~]# docker export -o test.tar 7ce403eba8d8
[root@localhost ~]# ls
anaconda-ks.cfg test.tar
[root@localhost ~]# docker import test.tar test/ubuntu:v0.1
sha256:c3d604273769f7a74126b27f29c8cecd055fc18b10c943da0c0528dc28520a60
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
test/ubuntu v0.1 c3d604273769 4 seconds ago 72.8 MB
docker.io/ubuntu latest fb52e22af1b0 3 weeks ago 72.8 MB
[root@localhost ~]# docker run -itd test/ubuntu:v0.1
/usr/bin/docker-current: Error response from daemon: No command specified.
See '/usr/bin/docker-current run --help'.
# add /bin/bash work
[root@localhost ~]# docker run -itd test/ubuntu:v0.1 /bin/bash
5b7dca448a1400716fa931463c2c314e0e59c7888fa77d5b182e72d911122966
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5b7dca448a14 test/ubuntu:v0.1 "/bin/bash" 3 seconds ago Up 2 seconds zen_varahamihira
7ce403eba8d8 docker.io/ubuntu:latest "bash" 5 minutes ago Up 5 minutes hungry_babbage
Read More:
- How to Solve Docker delete container image error: Error response from daemon: conflict: unable to delete 7cc1942f1ed5 (must be forced)
- Docker pull Command Error response from daemon: Head https://registry-1.docker.io/v2/library/
- [Solved] docker: Error response from daemon: OCI runtime create failed: container_linux.go:380
- Docker Start Container Error: Error response from daemon: task already exists: unknown
- [Solved] Docker Filed to Start Container: Error response from daemon: network XXX not found
- [Solved] Win 10 VS Code Connect to the container of the server error: Cannot connect to the Docker daemon at … Is the docker daemon running
- Linux Virtual Machine Boot Container: Error response from daemon: driver failed programming external connectivity on endpoint
- [Solved] Docker Download Mirror Error: Cannot connect to the Docker daemon at…
- [Solved] Docker Staratup Error: Failed to start Docker Application Container Engineadsafdsad.
- Docker Error: error invoking remote method ‘docker-start-container‘: error: (http code 500) server error –
- [Solved] Error response from daemon: manifest for nvidia/cuda:latest not found: manifest unknown: manifest
- [docker][issue]Error response from daemon: mkdir xxx: file exists: unknown
- Docker Run ‘echo core > /proc/sys/kernel/core_pattern‘ Error
- docker-compose -version Run Error [How to Fix]
- [Solved] Docker failed to delete image error: no such image: CentOS
- Linux Install Docker Error: Failed to restart docker.service: Unit docker.service not found.
- [Solved] docker Startup Error: Job for docker.service failed because the control process exited with error code
- Docker Startup Error: standard_init_linux.go:211: exec user process caused “no such file or directory”
- [Solved] Docker error: “unknown runtime specified NVIDIA” using GPU“
- [Solved] Job for docker.service failed because the control process exited with error code. After changing the docker configuration