Skip to content

Commit

Permalink
Squash docker layers after building
Browse files Browse the repository at this point in the history
  • Loading branch information
zootalures committed Feb 10, 2021
1 parent 740b95d commit 82a9c8d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,31 @@ mvn -B deploy -DaltDeploymentRepository=localStagingDir::default::file://${REP

(
cd images/build
./docker-build.sh --no-cache -t fnproject/fn-java-fdk-build:${BUILD_VERSION} .
./docker-build.sh --squash --no-cache -t fnproject/fn-java-fdk-build:${BUILD_VERSION} .
)

(
cd images/build
./docker-build.sh --no-cache -f Dockerfile-jdk11 -t fnproject/fn-java-fdk-build:jdk11-${BUILD_VERSION} .
./docker-build.sh --squash --no-cache -f Dockerfile-jdk11 -t fnproject/fn-java-fdk-build:jdk11-${BUILD_VERSION} .
)

(
cd runtime
docker build --no-cache -t fnproject/fn-java-fdk:${BUILD_VERSION} -f ../images/runtime/Dockerfile .
docker build --squash --no-cache -t fnproject/fn-java-fdk:${BUILD_VERSION} -f ../images/runtime/Dockerfile .
)

(
cd runtime
docker build --no-cache -f ../images/runtime/Dockerfile-jre11 -t fnproject/fn-java-fdk:jre11-${BUILD_VERSION} .
docker build --squash --no-cache -f ../images/runtime/Dockerfile-jre11 -t fnproject/fn-java-fdk:jre11-${BUILD_VERSION} .
)

(
workdir=$(pwd)/runtime
cd images/build-native
./docker-build.sh ${workdir}
./docker-build.sh --squash ${workdir}
)

(
cd images/init-native
./docker-build.sh
./docker-build.sh --squash
)

0 comments on commit 82a9c8d

Please sign in to comment.