What instructions do you use in Dockerfile to a previous stage as a new stage?
Experience Level: Senior
Tags: Docker
Answer
Use FROM <source-stage> AS <new-stage>
Example:
FROM alpine:latest AS stage1
# ...
FROM stage1 AS stage2
# ...
FROM stage1 AS stage3
# ...
Related Docker job interview questions
How can you ensure that some files will be ignored by a build process and won't be copied as part of COPY instruction that is defined in a Dockerfile?
Docker SeniorWhat Docker instruction will you use to copy files from one layer to another layer when you are creating a Dockerfile?
Docker SeniorWhat is the LABEL instruction good for in Docker?
Docker SeniorWhat is a difference between COPY and ADD instructions in Docker?
Docker SeniorWhat is the ADD instruction good for in Docker?
Docker Senior
Chat
Oh, the operator is not available. Leave us your comments. We will answer all your questions as soon as possible.
Anonymous
Καλησπέρα.
Καλησπέρα.
Anonymous
the infinteis -3/15 so 1triition / infinet
the infinteis -3/15 so 1triition / infinet
Anonymous
e
e
Anonymous
<a href="https://inspirum.pl "
<a href="https://inspirum.pl "
Anonymous
[url]https://inspirum.pl[/url]
[url]https://inspirum.pl[/url]
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e