Last active
April 27, 2022 10:56
-
-
Save sachith-1/c80d11bdfdc2575761429f3054816000 to your computer and use it in GitHub Desktop.
bash script for docker builder pattern demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo building image node_project:build | |
docker build -t node_project:build -f Dockerfile.build . | |
# create a new container from the image and copy dist folder content to distapp folder | |
docker create --name copyContainer node_project:build | |
docker cp copyContainer:/usr/src/app/dist ./distapp | |
docker rm -f copyContainer | |
echo building image node_project:prod | |
docker build -t node_project:prod -f Dockerfile.prod . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment