[root@controller test-mysentry-sdk-server]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.wctmd.us.kg/centos centos7.9.2009 eeb6ee3f44bd 3 years ago 204MB
jumpserver/jms_all 1.5.5 cfd48a4e88c8 4 years ago 1.36GB
[root@controller test-mysentry-sdk-server]# cat Dockerfile
FROM docker.wctmd.us.kg/centos:centos7.9.2009
RUN ls
[root@controller test-mysentry-sdk-server]# docker build --no-cache -t harbor.com.cn/test/test:2 -f Dockerfile .
[+] Building 0.2s (5/5) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 90B 0.0s
=> [internal] load metadata for docker.wctmd.us.kg/centos:centos7.9.2009 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [1/2] FROM docker.wctmd.us.kg/centos:centos7.9.2009 0.0s
=> ERROR [2/2] RUN ls 0.2s
------
> [2/2] RUN ls:
0.014 Incorrect Usage: flag provided but not defined: -keep
0.014
0.014 NAME:
0.014 runc run - create and run a container
0.014
0.014 USAGE:
0.015 runc run [command options] <container-id>
0.015
0.015 Where "<container-id>" is your name for the instance of the container that you
0.015 are starting. The name you provide for the container instance must be unique on
0.015 your host.
0.015
0.015 DESCRIPTION:
0.015 The run command creates an instance of a container for a bundle. The bundle
0.015 is a directory with a specification file named "config.json" and a root
0.015 filesystem.
0.015
0.015 The specification file includes an args parameter. The args parameter is used
0.015 to specify command(s) that get run when the container is started. To change the
0.015 command(s) that get executed on start, edit the args parameter of the spec. See
0.015 "runc spec --help" for more explanation.
0.015
0.015 OPTIONS:
0.015 --bundle value, -b value path to the root of the bundle directory, defaults to the current directory
0.015 --console-socket value path to an AF_UNIX socket which will receive a file descriptor referencing the master end of the console's pseudoterminal
0.015 --detach, -d detach from the container's process
0.015 --pid-file value specify the file to write the process id to
0.015 --no-subreaper disable the use of the subreaper used to reap reparented processes
0.015 --no-pivot do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk
0.015 --no-new-keyring do not create a new session keyring for the container. This will cause the container to inherit the calling processes session key
0.015 --preserve-fds value Pass N additional file descriptors to the container (stdio + $LISTEN_FDS + N in total) (default: 0)
0.015
0.015 flag provided but not defined: -keep
------
Dockerfile:2
--------------------
1 | FROM docker.wctmd.us.kg/centos:centos7.9.2009
2 | >>> RUN ls
3 |
--------------------
ERROR: failed to solve: process "/bin/sh -c ls" did not complete successfully: exit code: 1
[root@controller test-mysentry-sdk-server]#
镜像有,Dockefile也很简单,RUN就失败