Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zartek-creole/docker-multi-stages-test
https://github.com/zartek-creole/docker-multi-stages-test
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/zartek-creole/docker-multi-stages-test
- Owner: ZarTek-Creole
- License: other
- Created: 2021-07-16T20:19:49.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T11:57:16.000Z (over 2 years ago)
- Last Synced: 2024-05-01T15:05:06.038Z (9 months ago)
- Language: Dockerfile
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![CC BY 4.0][cc-by-shield]][cc-by][cc-by]: http://creativecommons.org/licenses/by/4.0/
[cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg
environment:
VAR2: CONTENT2
```
resultat:
```
└> docker-compose up --build --force-recreate
Building multi-stages
Sending build context to Docker daemon 42.5kB
Step 1/9 : FROM debian:sid-slim AS multistages_BUILDER
---> 715e7b66ebe0
Step 2/9 : ARG VAR1="testcontent1"
---> Using cache
---> 70a0a896dee6
Step 3/9 : ENV VAR2="testcontent2"
---> Using cache
---> 333fc26ecb38
Step 4/9 : RUN echo "ON multistages_BUILDER 'VAR1' is '$VAR1' and 'VAR2' is '$VAR2'"
---> Using cache
---> bfb198b952cb
Step 5/9 : FROM multistages_BUILDER as multistages_BUILD
---> bfb198b952cb
Step 6/9 : RUN echo "1 -> ON multistages_BUILD 'VAR1' is '$VAR1' and 'VAR2' is '$VAR2'"
---> Running in 33799dcd0551
1 -> ON multistages_BUILD 'VAR1' is '' and 'VAR2' is 'testcontent2'
Removing intermediate container 33799dcd0551
---> 14308ac5b1dd
Step 7/9 : ARG VAR1=""
---> Running in fd4c6b3fe31f
Removing intermediate container fd4c6b3fe31f
---> 3089dea4ab56
Step 8/9 : ENV VAR2=""
---> Running in 0b661970d08c
Removing intermediate container 0b661970d08c
---> 5ed0e9459cec
Step 9/9 : RUN echo "2 -> ON multistages_BUILD 'VAR1' is '$VAR1' and 'VAR2' is '$VAR2'"
---> Running in f3f313ca0545
2 -> ON multistages_BUILD 'VAR1' is 'CONTENT1' and 'VAR2' is ''
Removing intermediate container f3f313ca0545
---> fc6a855706fe
Successfully built fc6a855706fe
Successfully tagged docker-multi-stages-test_multi-stages:latest
Recreating docker-multi-stages-test_multi-stages_1 ... done
Attaching to docker-multi-stages-test_multi-stages_1
docker-multi-stages-test_multi-stages_1 exited with code 0
```
ENVs VAR2 work on first FROM and not on multistages_BUILD