Skip to content

Commit 82a9c8d

Browse files
committed
Squash docker layers after building
1 parent 740b95d commit 82a9c8d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,31 @@ mvn -B deploy -DaltDeploymentRepository=localStagingDir::default::file://${REP
4141

4242
(
4343
cd images/build
44-
./docker-build.sh --no-cache -t fnproject/fn-java-fdk-build:${BUILD_VERSION} .
44+
./docker-build.sh --squash --no-cache -t fnproject/fn-java-fdk-build:${BUILD_VERSION} .
4545
)
4646

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

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

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

6262
(
6363
workdir=$(pwd)/runtime
6464
cd images/build-native
65-
./docker-build.sh ${workdir}
65+
./docker-build.sh --squash ${workdir}
6666
)
6767

6868
(
6969
cd images/init-native
70-
./docker-build.sh
70+
./docker-build.sh --squash
7171
)

0 commit comments

Comments
 (0)