-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multistage docker, read tag name from file
- Loading branch information
1 parent
1253e7f
commit a77d149
Showing
3 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
from nginx:alpine | ||
from alpine as build | ||
|
||
RUN apk add --no-cache sed | ||
COPY app/ /app | ||
RUN ls -alh /app | ||
RUN echo "test" | ||
RUN export version=$(cat /app/version.txt) && echo $version | ||
RUN sed -i'' "s/--version--/$version/g" /app/index.html | ||
|
||
|
||
from nginx:alpine as prod | ||
|
||
|
||
COPY --from=build /app /usr/share/nginx/html | ||
|
||
|
||
COPY app /usr/share/nginx/html |
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