[rustler2000@KOPOBA zzz]$ echo "FROM ubuntu
> RUN apt update
> RUN touch /file1
> ENTRYPOINT bash
> " > Dockerfile
[rustler2000@KOPOBA zzz]$ docker build -t test:local .
Sending build context to Docker daemon 2.048kB
Step 1/4 : FROM ubuntu
---> dd6f76d9cc90
Step 2/4 : RUN apt update
---> Running in 5a163961a255
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [52.0 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [490 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.9 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [224 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3479 B]
Get:11 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [224 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [851 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.7 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [700 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [18.5 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [5176 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6354 B]
Fetched 24.5 MB in 5s (4844 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
---> 890a058de0f1
Removing intermediate container 5a163961a255
Step 3/4 : RUN touch /file1
---> Running in 55f005da5cbf
---> c8c203fbef4f
Removing intermediate container 55f005da5cbf
Step 4/4 : ENTRYPOINT bash
---> Running in f9af0ded79c1
---> 2250d82c196a
Removing intermediate container f9af0ded79c1
Successfully built 2250d82c196a
Successfully tagged test:local
[rustler2000@KOPOBA zzz]$
[rustler2000@KOPOBA zzz]$
[rustler2000@KOPOBA zzz]$
[rustler2000@KOPOBA zzz]$ sed -i 's/file1/file2/' Dockerfile
[rustler2000@KOPOBA zzz]$ cat Dockerfile
FROM ubuntu
RUN apt update
RUN touch /file2
ENTRYPOINT bash
[rustler2000@KOPOBA zzz]$ docker build -t test:local .
Sending build context to Docker daemon 2.048kB
Step 1/4 : FROM ubuntu
---> dd6f76d9cc90
Step 2/4 : RUN apt update
---> Using cache
---> 890a058de0f1
Step 3/4 : RUN touch /file2
---> Running in 2e6ab256c3f8
---> 9803943a0f6b
Removing intermediate container 2e6ab256c3f8
Step 4/4 : ENTRYPOINT bash
---> Running in 24e05136ee7f
---> 382c1931ca77
Removing intermediate container 24e05136ee7f
Successfully built 382c1931ca77
Successfully tagged test:local