-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce size of cli docker image by removing tar (#214)
* Reduce size of cli docker image by removing tar fixes: #213 Have the Gradle build unpack the distribution tar archive. This means there is no need to install tar or to have the tar file in the Docker image. * oops - still need to copy the expanded archive in * Switch to a smaller base image fixes: #213
- Loading branch information
1 parent
5d21aef
commit 95f2091
Showing
2 changed files
with
3 additions
and
9 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 |
---|---|---|
@@ -1,28 +1,22 @@ | ||
FROM amazoncorretto:20@sha256:ac32b3e93f843470c7f55b7d694df016def3d02d55de83e2f43d432a8884b3a4 | ||
FROM eclipse-temurin:11-jre-focal@sha256:4c1ab549795f20b661bfaaa22716e5e10a8eae66a534e668a1e028683c810efa | ||
|
||
ARG APP_NAME | ||
ARG APP_VERSION | ||
ENV VERSION=$APP_VERSION | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/specmesh/specmesh-build/tree/main/cli | ||
|
||
RUN yum update -y | ||
RUN yum install -y tar lsof | ||
|
||
RUN mkdir -p /opt/specmesh | ||
|
||
COPY bin /bin | ||
COPY log4j /log | ||
|
||
RUN chmod +x /bin/*.sh | ||
|
||
COPY ${APP_NAME}-${APP_VERSION}.tar /opt/specmesh | ||
COPY ${APP_NAME}-${APP_VERSION} /opt/specmesh/${APP_NAME}-${APP_VERSION} | ||
WORKDIR /opt/specmesh | ||
|
||
RUN tar xf ${APP_NAME}-${APP_VERSION}.tar | ||
RUN ln -s ${APP_NAME}-${APP_VERSION} service | ||
|
||
|
||
|
||
ENTRYPOINT ["/bin/wrapper.sh"] | ||
#No CMD instruction is provided, allowing you to pass any number of arguments at runtime. |
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