forked from The-OpenROAD-Project/OpenROAD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With the separation between runtime and binary we can deploy the runtime image to hub.docker.com without a binary. Signed-off-by: Vitor Bandeira <vitor.vbandeira@gmail.com>
- Loading branch information
1 parent
c67dc87
commit e1cefbe
Showing
5 changed files
with
35 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# create image with runtime dependencies and a copy of the binary from a | ||
# builder image | ||
# NOTE: don't use this file directly unless you know what you are doing, | ||
# instead use etc/DockerHelper.sh | ||
|
||
# https://github.com/moby/moby/issues/38379#issuecomment-448445652 | ||
ARG copyImage=openroad/centos7-builder:latest | ||
ARG fromImage=openroad/centos7-runtime:latest | ||
|
||
# need to use the line below as the "COPY --from" does not accept an ARG | ||
FROM $copyImage AS copyfrom | ||
|
||
FROM $fromImage | ||
|
||
COPY --from=copyfrom /OpenROAD/build/src/openroad /usr/bin/. | ||
|
||
ENTRYPOINT [ "openroad" ] |
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
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,18 +1,11 @@ | ||
# create image only with runtime dependencies | ||
# copies binary from a builder image | ||
# NOTE: don't use this file directly unless you know what you are doing, | ||
# instead use etc/DockerHelper.sh | ||
|
||
# https://github.com/moby/moby/issues/38379#issuecomment-448445652 | ||
ARG copyImage=openroad/centos7-builder:latest | ||
ARG fromImage=centos:centos7 | ||
|
||
# need to use the line below as the "COPY --from" does not accept an ARG | ||
FROM $copyImage AS copyfrom | ||
FROM $fromImage AS runtime | ||
FROM $fromImage | ||
|
||
COPY DependencyInstaller.sh /tmp/. | ||
RUN /tmp/DependencyInstaller.sh -runtime && rm -f /tmp/DependencyInstaller.sh | ||
|
||
COPY --from=copyfrom /OpenROAD/build/src/openroad /usr/bin/. | ||
ENTRYPOINT [ "openroad" ] |
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