from

RUN

CMD

EXPOSE

LABEL

ENV

COPY

格式

COPY [--chown=<用户>:<组>]<源>...<目的>

COPY [--chown=<用户>:<组>]["<源>"..."<目的>"]

案例

[root@hmm ~]# mkdir  yum3-centos
[root@hmm ~]# ls
anaconda-ks.cfg docker-hello hello.c sizetest yum3-centos
Dockerfile hello hello-world.tar test1
[root@hmm ~]# cd yum3-centos/
[root@hmm yum3-centos]# ls
[root@hmm yum3-centos]# touch Dockerfile
[root@hmm yum3-centos]# touch nginx.repo
[root@hmm yum3-centos]# pwd
/root/yum3-centos
[root@hmm yum3-centos]# vim Dockerfile
-bash: vim: command not found
[root@hmm yum3-centos]# vi Dockerfile
[root@hmm yum3-centos]# vi nginx.repo
[root@hmm yum3-centos]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry latest 9363667f8aec 2 weeks ago 25.4MB
centos-with-nginx latest fe0f7fc1d27c 2 weeks ago 248MB
imglayers-test latest 3d2d641327e8 2 weeks ago 196MB
my-hello latest e8c9e00260a8 3 weeks ago 861kB
registry.cn-hangzhou.aliyuncs.com/hanmiao_03/hmmmm 24.03.26 e8c9e00260a8 3 weeks ago 861kB
127.0.0.1:5000/ubuntu latest ca2b0f26964c 4 weeks ago 77.9MB
ubuntu latest ca2b0f26964c 4 weeks ago 77.9MB
httpd latest ac45b24b92cc 2 months ago 167MB
hm/ubuntu hhh f9a80a55f492 10 months ago 63.2MB
ubuntu 18.04 f9a80a55f492 10 months ago 63.2MB
hello-world latest d2c94e258dcb 11 months ago 13.3kB
127.0.0.1:5000/centos v1 5d0da3dc9764 2 years ago 231MB
centos latest 5d0da3dc9764 2 years ago 231MB
ubuntu 14.04 13b66b487594 3 years ago 197MB
[root@hmm yum3-centos]# docker run centos-with-nginx
[root@hmm yum3-centos]# docker build -t 'yun3-copy1' .
[+] Building 0.2s (7/7) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 99B 0.0s
=> [internal] load metadata for docker.io/library/centos:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 140B 0.0s
=> [1/2] FROM docker.io/library/centos:latest 0.0s
=> [2/2] COPY ./nginx.repo /etc/yum.repos.d/ 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:592cacbb3f593d986c578fdb9e29ea0e806b057b 0.0s
=> => naming to docker.io/library/yun3-copy1 0.0s
[root@hmm yum3-centos]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
yun3-copy1 latest 592cacbb3f59 5 seconds ago 231MB
registry latest 9363667f8aec 2 weeks ago 25.4MB
centos-with-nginx latest fe0f7fc1d27c 2 weeks ago 248MB
imglayers-test latest 3d2d641327e8 2 weeks ago 196MB
my-hello latest e8c9e00260a8 3 weeks ago 861kB
registry.cn-hangzhou.aliyuncs.com/hanmiao_03/hmmmm 24.03.26 e8c9e00260a8 3 weeks ago 861kB
127.0.0.1:5000/ubuntu latest ca2b0f26964c 4 weeks ago 77.9MB
ubuntu latest ca2b0f26964c 4 weeks ago 77.9MB
httpd latest ac45b24b92cc 2 months ago 167MB
hm/ubuntu hhh f9a80a55f492 10 months ago 63.2MB
ubuntu 18.04 f9a80a55f492 10 months ago 63.2MB
hello-world latest d2c94e258dcb 11 months ago 13.3kB
127.0.0.1:5000/centos v1 5d0da3dc9764 2 years ago 231MB
centos latest 5d0da3dc9764 2 years ago 231MB
ubuntu 14.04 13b66b487594 3 years ago 197MB
[root@hmm yum3-centos]# docker run -ti yun3-copy1
[root@5e60d54ffd46 /]# cd /etc/yum.repos.d/
[root@5e60d54ffd46 yum.repos.d]# ls
CentOS-Linux-AppStream.repo CentOS-Linux-HighAvailability.repo
CentOS-Linux-BaseOS.repo CentOS-Linux-Media.repo
CentOS-Linux-ContinuousRelease.repo CentOS-Linux-Plus.repo
CentOS-Linux-Debuginfo.repo CentOS-Linux-PowerTools.repo
CentOS-Linux-Devel.repo CentOS-Linux-Sources.repo
CentOS-Linux-Extras.repo nginx.repo
CentOS-Linux-FastTrack.repo
[root@5e60d54ffd46 yum.repos.d]# cat nginx.repo
[nginx]
name=nginx
baseurl=http://nginx.org/packages/centos/$releasever/$basearch
gpgcheck=0
enabled=1

源路径必须位于构建上下文中

使用copy的时候超出当前构建范围,不管是使用相对路径还是使用绝对路径,构建镜像的时候都会报错

  • 使用相对路径构建
[root@hmm yum3-centos]# docker build -t  yum3-copy2 .
[+] Building 0.0s (7/7) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 135B 0.0s
=> [internal] load metadata for docker.io/library/centos:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/3] FROM docker.io/library/centos:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 31B 0.0s
=> CACHED [2/3] COPY ./nginx.repo /etc/yum.repos.d/ 0.0s
=> ERROR [3/3] COPY ../../home/hmm/hello.txt /root 0.0s
------
> [3/3] COPY ../../home/hmm/hello.txt /root:
------
Dockerfile:3
--------------------
1 | FROM centos
2 | COPY ./nginx.repo /etc/yum.repos.d/
3 | >>> COPY ../../home/hmm/hello.txt /root #报错
4 | CMD /bin/bash
5 |
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 77c8e775-3806-4851-a513-b1983d25edd4::03l8kntfbdcyvyt4tw33xeuv5: "/home/hmm/hello.txt": not found
[root@hmm yum3-centos] #不管源文件是用的绝对路径还是相对路径,只要超出了当前路径那么就会失败,报错
  • 使用绝对路径
[+] Building 0.0s (7/7) FINISHED                            docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 139B 0.0s
=> [internal] load metadata for docker.io/library/centos:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/3] FROM docker.io/library/centos:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 31B 0.0s
=> CACHED [2/3] COPY ./nginx.repo /etc/yum.repos.d/ 0.0s
=> ERROR [3/3] COPY /root/yum3-centos/nginx.repo /root 0.0s
------
> [3/3] COPY /root/yum3-centos/nginx.repo /root:
------
Dockerfile:3
--------------------
1 | FROM centos
2 | COPY ./nginx.repo /etc/yum.repos.d/
3 | >>> COPY /root/yum3-centos/nginx.repo /root #报错
4 | CMD /bin/bash
5 |
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 77c8e775-3806-4851-a513-b1983d25edd4::pu9wv1zzwb7w9tuck529visuq: "/root/yum3-centos/nginx.repo": not found
[root@hmm yum3-centos]#

如果源是目录,则复制目录的整个内容,包括文件系统元数据。

[root@hmm yum3-centos]# vi Dockerfile
[root@hmm yum3-centos]# docker build -t yum3-copy3 .
[+] Building 0.3s (8/8) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 130B 0.0s
=> [internal] load metadata for docker.io/library/centos:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/3] FROM docker.io/library/centos:latest 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 962.10kB 0.1s
=> CACHED [2/3] COPY ./nginx.repo /etc/yum.repos.d/ 0.0s
=> [3/3] COPY ./lunisolar-main/ /home/ 0.0s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:84ae402461bb0b18255a4fbe8dfd918f35e26072 0.0s
=> => naming to docker.io/library/yum3-copy3 0.0s
[root@hmm yum3-centos]# docker run yum3-copy3
[root@hmm yum3-centos]# docker run -ti yum3-copy3
[root@153b880fd808 /]# ls
bin etc lib lost+found mnt proc run srv tmp var
dev home lib64 media opt root sbin sys usr
[root@153b880fd808 /]# cd /home/
[root@153b880fd808 home]# ls
CHANGELOG.md babel.config.js package.json tsconfig.json
LICENSE changelog-config.js pnpm-lock.yaml typings
README.md docs rollup.config.js
__tests__ jest.config.ts src
[root@153b880fd808 home]#

多个源

#如果直接指定多个源,或者源中使用了通配符,则目的路径必须是目录,并且必须以斜杠(/)结尾
[root@hmm yum3-centos]# ls
Dockerfile lunisolar-main nginx.repo
[root@hmm yum3-centos]# vim Dockerfile
[root@hmm yum3-centos]# cat Dockerfile
FROM centos
COPY ./luni* nginx.repo /home/
CMD /bin/bash
[root@hmm yum3-centos]# docker build -t "yun3-copy5" .
[+] Building 0.1s (7/7) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 94B 0.0s
=> [internal] load metadata for docker.io/library/centos:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 10.89kB 0.0s
=> CACHED [1/2] FROM docker.io/library/centos:latest 0.0s
=> [2/2] COPY ./luni* nginx.repo /home/ 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:d4277a7b443afe5bc46923ee7beb05eef0364295 0.0s
=> => naming to docker.io/library/yun3-copy5 0.0s
[root@hmm yum3-centos]# docker run -ti yun3-copy5
[root@34cfdea289ae /]# cd /home/
[root@34cfdea289ae home]# ls
CHANGELOG.md babel.config.js nginx.repo src
LICENSE changelog-config.js package.json tsconfig.json
README.md docs pnpm-lock.yaml typings
__tests__ jest.config.ts rollup.config.js
[root@34cfdea289ae home]#
  • 如果目的路径不以斜杠结尾,则它将被视为常规文件,源内容将被写入目录路径(简单来说就是会重命名)

  • 如果目的路径不存在,则会与其路径中所有缺少的目录一起被创建。(简单来说就是,会自动创建路径)

ADD

实例

[root@hmm yum3-centos]# docker build -t 'yun3-add' .
[+] Building 0.2s (10/10) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 189B 0.0s
=> [internal] load metadata for docker.io/library/cento 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [1/4] FROM docker.io/library/centos:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 413.14kB 0.0s
=> http://mirrors.aliyun.com/repo/Centos-8.repo 0.1s
=> [2/4] ADD nginx.repo /etc/yum.repos.d/ 0.0s
=> [3/4] ADD http://mirrors.aliyun.com/repo/Centos-8.re 0.0s
=> [4/4] ADD lunisolar-main.zip /home/yun3/ 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:eb713753ec15edfd95fe4feba80d 0.0s
=> => naming to docker.io/library/yun3-add 0.0s
[root@hmm yum3-centos]# docker run -ti yun3-add
[root@ec222ba8717e /]# ls
bin etc lib lost+found mnt proc run srv tmp var
dev home lib64 media opt root sbin sys usr
[root@ec222ba8717e /]# cd root/
[root@ec222ba8717e ~]# ls
Centos-8.repo anaconda-post.log
anaconda-ks.cfg original-ks.cfg
[root@ec222ba8717e ~]# cd /home/
[root@ec222ba8717e home]# ls
yun3
[root@ec222ba8717e home]# cd yun3/
[root@ec222ba8717e yun3]# ls
lunisolar-main.zip
[root@ec222ba8717e yun3]# cd /etc/yum.repos.d/
[root@ec222ba8717e yum.repos.d]# ls
CentOS-Linux-AppStream.repo
CentOS-Linux-BaseOS.repo
CentOS-Linux-ContinuousRelease.repo
CentOS-Linux-Debuginfo.repo
CentOS-Linux-Devel.repo
CentOS-Linux-Extras.repo
CentOS-Linux-FastTrack.repo
CentOS-Linux-HighAvailability.repo
CentOS-Linux-Media.repo
CentOS-Linux-Plus.repo
CentOS-Linux-PowerTools.repo
CentOS-Linux-Sources.repo
nginx.repo

entrypoint

实例

  • 只有cmd
  • 只有entrypoint
[root@hmm yum3]# docker build -t "entry-test-3" .
[+] Building 0.1s (11/11) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 385B 0.0s
=> [internal] load metadata for docker.io/library/c 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/5] FROM docker.io/library/centos:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 28B 0.0s
=> http://mirrors.aliyun.com/repo/Centos-8.repo 0.1s
=> CACHED [2/5] RUN rm -rf /etc/yum.repos.d/*.repo 0.0s
=> CACHED [3/5] ADD http://mirrors.aliyun.com/repo/ 0.0s
=> CACHED [4/5] ADD test.py /root/ 0.0s
=> CACHED [5/5] RUN yum install -y python38 0.0s
=> exporting to image 0.1s
=> => exporting layers 0.0s
=> => writing image sha256:351421498ec6d823e1c82e8e 0.1s
=> => naming to docker.io/library/entry-test-3 0.0s
[root@hmm yum3]# docker run -ti entry-test-3
/
['bin', 'dev', 'etc', 'home', 'lib', 'lib64', 'lost+found', 'media', 'mnt', 'opt', 'proc', 'root', 'run', 'sbin', 'srv', 'sys', 'tmp', 'usr', 'var', 'yun3-777', '.dockerenv']
[root@hmm yum3]# cat Dockerfile
FROM centos
RUN rm -rf /etc/yum.repos.d/*.repo
ADD http://mirrors.aliyun.com/repo/Centos-8.repo /etc/yum.repos.d/
ADD test.py /root/
RUN yum install -y python38 # 启动容器默认执行的脚本或者命令
ENTRYPOINT ["/usr/bin/python3","/root/test.py"] #CMD ["/bin/bash"] # 单独只有cmd指令:容器启动的时默认执行的命令 [root@hmm yum3]# cat test.py
# -*- coding:utf-8 -*-
import os #打印当前路径
print(os.getcwd())
os.mkdir('yun3-777')
print(os.listdir('.'))

让python程序接受打印命令行传参数

没修改了一个程序,需要重新构建一个镜像

[root@hmm yum3]# docker rmi -f  c065771342b6 #删除之前的镜像,更加清晰
Untagged: entry-test3:latest
Deleted: sha256:c065771342b650d7fb499b007086de7c7c1d2286283ff9f48351478fb3b6d809
[root@hmm yum3]# docker build -t 'entry-test3.1' .
[+] Building 22.0s (11/11) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 385B 0.0s
=> [internal] load metadata for docker.io/library/c 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/5] FROM docker.io/library/centos:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 173B 0.0s
=> http://mirrors.aliyun.com/repo/Centos-8.repo 0.0s
=> CACHED [2/5] RUN rm -rf /etc/yum.repos.d/*.repo 0.0s
=> CACHED [3/5] ADD http://mirrors.aliyun.com/repo/ 0.0s
=> [4/5] ADD test.py /root/ 0.0s
=> [5/5] RUN yum install -y python38 21.6s
=> exporting to image 0.4s
=> => exporting layers 0.4s
=> => writing image sha256:7e6bc7bbfa684aedf1f5af1d 0.0s
=> => naming to docker.io/library/entry-test3.1 0.0s
[root@hmm yum3]# docker run -ti entry-test3.1
/
['bin', 'dev', 'etc', 'home', 'lib', 'lib64', 'lost+found', 'media', 'mnt', 'opt', 'proc', 'root', 'run', 'sbin', 'srv', 'sys', 'tmp', 'usr', 'var', 'yun3-777', '.dockerenv']
['/root/test.py']
[root@hmm yum3]# docker run -ti entry-test3.1 hmmmmm
/
['bin', 'dev', 'etc', 'home', 'lib', 'lib64', 'lost+found', 'media', 'mnt', 'opt', 'proc', 'root', 'run', 'sbin', 'srv', 'sys', 'tmp', 'usr', 'var', 'yun3-777', '.dockerenv']
['/root/test.py', 'hmmmmm'] #传参数成功
  • 既有cmd又有entrypoint

    两个指令一起使用的时候,entrypoint指令作为可执行文件或者命令,cmd为entrypoint提供默认参数,docker run 指定命令可替换cmd默认参数
[root@hmm yum3]# docker build -t "entry-cmd-test" .
[+] Building 0.1s (11/11) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 385B 0.0s
=> [internal] load metadata for docker.io/library/c 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/5] FROM docker.io/library/centos:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 29B 0.0s
=> http://mirrors.aliyun.com/repo/Centos-8.repo 0.0s
=> CACHED [2/5] RUN rm -rf /etc/yum.repos.d/*.repo 0.0s
=> CACHED [3/5] ADD http://mirrors.aliyun.com/repo/ 0.0s
=> CACHED [4/5] ADD test.py /root/ 0.0s
=> CACHED [5/5] RUN yum install -y python38 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:e2f1cde9ca8c1667c019eb4a 0.0s
=> => naming to docker.io/library/entry-cmd-test 0.0s
[root@hmm yum3]# docker run -ti entry-cmd-test
/
['bin', 'dev', 'etc', 'home', 'lib', 'lib64', 'lost+found', 'media', 'mnt', 'opt', 'proc', 'root', 'run', 'sbin', 'srv', 'sys', 'tmp', 'usr', 'var', 'yun3-777', '.dockerenv']
['/root/test.py', '/bin/bash'#此处为cmd传入的默认参数]
[root@hmm yum3]# docker run -ti entry-cmd-test yun3-hmmm
/
['bin', 'dev', 'etc', 'home', 'lib', 'lib64', 'lost+found', 'media', 'mnt', 'opt', 'proc', 'root', 'run', 'sbin', 'srv', 'sys', 'tmp', 'usr', 'var', 'yun3-777', '.dockerenv']
['/root/test.py', 'yun3-hmmm'#此处为python接收到传入的参数,覆盖率;了cmd]
[root@hmm yum3]#

VOLUME(创建挂载点)

WORKDIR(配置工作目录)

[root@hmm yum3]# docker build -t "work-test" .
[+] Building 23.1s (12/12) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 405B 0.0s
=> [internal] load metadata for docker.io/library/c 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [1/6] FROM docker.io/library/centos:lates 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 29B 0.0s
=> CACHED http://mirrors.aliyun.com/repo/Centos-8.r 0.1s
=> [2/6] WORKDIR /usr/local/ 0.0s
=> [3/6] RUN rm -rf /etc/yum.repos.d/*.repo 0.1s
=> [4/6] ADD http://mirrors.aliyun.com/repo/Centos- 0.0s
=> [5/6] ADD test.py /root/ 0.0s
=> [6/6] RUN yum install -y python38 22.6s
=> exporting to image 0.4s
=> => exporting layers 0.4s
=> => writing image sha256:b1064a2ef4c3a4c5fe8afe22 0.0s
=> => naming to docker.io/library/work-test 0.0s
[root@hmm yum3]# docker run -ti --entrypoint '/bin/bash' work-test
# --entrypoint 覆盖配置文件中的entrypoint?还是指定entrypoint参数
[root@962f735c9bdc local]# pwd
/usr/local #工作目录切换成功
[root@962f735c9bdc local]#

其他指令

- USER

  • ARG
  • SHEL

docker构建镜像——Dockerfile的更多相关文章

  1. docker 构建镜像 centos7 nginx php

    #docker 构建镜像(Dockerfile) centos 7.4.1078镜像制作 nginx镜像制作(以前面centos7镜像为基础) Nginx+php镜像制作 更多操作实例,查看git里的 ...

  2. Docker 构建镜像

    Docker 构建镜像 1.首先,在项目的根目录下,新建一个文本文件.dockerignore,写入下面的内容. 下面三行代码表示: 1.这三个路径要排除,不要打包进入 image 文件. 2.如果你 ...

  3. Geoserver+Openlayers+MySQL设计思想,GeoServer服务器搭建(Docker构建镜像)

    Geoserver+Openlayers+MySQL设计思想,GeoServer服务器搭建(Docker构建镜像) 一.geoserver+openlayers+mysql主要设计思想 1.1 Geo ...

  4. docker构建镜像 (3)

    使用Dockerfile构建镜像 Dockerfile使用DSL(Domain Specific Language)来构建一个Docker镜像,只要编辑好了Dockerfile文件,就可以使用dock ...

  5. docker构建镜像

    Docker 提供了两种构建镜像的方法: docker commit 命令Dockerfile 构建文件 示例: Dockerfile FROM golang:1.7.5 #基础镜像 RUN apt- ...

  6. Docker构建镜像踩坑日记

    从Github上拉取python项目后,运行dockerfile构建镜像失败,一步步查找原因 主要原因就是国内下载各种依赖超时,以下提供pip.apt.pipenv镜像解决方案 pip更换国内镜像 这 ...

  7. 关于docker构建镜像

    今天正好看到这一块了,记录一下,希望可以帮助到大家. 构建Dockerfile 先来看一个示例: --------------------------------------------------- ...

  8. Docker构建镜像过于缓慢解决-----Docker构建服务之部署和备份jekyll网站

    参考原文链接:https://www.jianshu.com/p/e6b7e68f2ba7 来自<第一本Docker书>,我觉得很有趣,就记录一下 准备国内ubuntu镜像 每次构建Ubu ...

  9. Docker容器学习梳理 - Dockerfile构建镜像

    在Docker的运用中,从下载镜像,启动容器,在容器中输入命令来运行程序,这些命令都是手工一条条往里输入的,无法重复利用,而且效率很低.所以就需要一 种文件或脚本,我们把想执行的操作以命令的方式写入其 ...

  10. Docker镜像构建之Dockerfile

    在 Docker 中构建镜像最常用的方式就是使用 Dockerfile.Dockerfile 是一个用来构建镜像的文本文件. 官方文档:https://docs.docker.com/engine/r ...

随机推荐

  1. .NET开源免费的跨平台框架 - MAUI(附学习资料)

    前言 前几天分享了一个.NET MAUI开源免费的UI工具包 - Uranium,然后技术群有不少同学问.NET MAUI是不是免费的?能做什么?今天特意写这篇文章来介绍一下.NET开源.免费(基于M ...

  2. 力扣344(java & python)-反转字符串(简单)

    题目: 编写一个函数,其作用是将输入的字符串反转过来.输入字符串以字符数组 s 的形式给出. 不要给另外的数组分配额外的空间,你必须原地修改输入数组.使用 O(1) 的额外空间解决这一问题. 示例 1 ...

  3. App隐私合规“免费”自动化检测

    简介: App隐私合规检测提供了全面的隐私合规检测报告和专家建议,从确保形式合规(隐私政策文本合规性)及实质合规(代码层合规性)的一致性,从个人信息收集.权限使用场景.超范围采集.隐私政策.三方SDK ...

  4. 模型代码联动难? BizWorks来助力

    简介: 本文介绍了业务模型设计和实现保持一致的重要性以及实际落地可能遇到的问题,以及BizWorks如何设计并提供一种双向联动能力, 通过BizWorks Toolkit(IDE 插件) 来解决和优化 ...

  5. 任务不再等待!玩转DataWorks资源组

    引言 DataWorks提供了三种资源组的能力:独享资源组.自定义资源组和默认资源组,很多开发者在使用资源组时经常会碰到各类情况,到时候任务运行失败或者延迟,例如:1. 正在使用默认资源组,任务经常要 ...

  6. “2021ISIG中国产业智能大会低代码峰会”即将开幕,钉钉宜搭叶周全受邀出席

    ​简介:2021年12月8-9日,"2021ISIG中国产业智能大会" 将在上海举行.阿里巴巴资深技术专家,钉钉宜搭创始人叶周全将作为特邀嘉宾出席大会. 2021年12月8-9日, ...

  7. TheWay2Hack

    coding 阶段一 打基础. CS61A:现在进度落后一个月,递归部分让我焦头烂额.所以将完成时间延后了一个月,截止到6月7号搞完. CSAPP:卡在datalab,按照3月18号开始,预计7月1号 ...

  8. 第一讲 Cadence-于真博士课程简介

    第一讲 Cadence-于真博士课程简介 以工程化的思想来学习本课程,比较有效,从一个DSP开发板设计为例开始,做出PCB板,顺带学会Cadence软件操作,而不是仅仅学习软件. 前期准备工作,阅读配 ...

  9. foreach更改element内容后this到data不生效导致页面数据无变化

    list.forEach(element => {  element = element.split('^')    console.log(element)  }) 数据已经被更改,但在外部t ...

  10. 羽夏壳世界—— PE 解析的实现

    写在前面   此系列是本人一个字一个字码出来的,包括代码实现和效果截图. 如有好的建议,欢迎反馈.码字不易,如果本篇文章有帮助你的,如有闲钱,可以打赏支持我的创作.如想转载,请把我的转载信息附在文章后 ...