Skip to content

Commit 35968ad

Browse files
committedApr 17, 2024
build: get number of layers in images
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent 311b638 commit 35968ad

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
 

‎.github/workflows/build-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
GH_ORG: ${{ vars.GH_ORG || 'SeleniumHQ' }}
5353
- name: Build Docker images
5454
run: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
55+
- name: Count image layers
56+
run: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make count_image_layers
5557
- name: Test Docker images
5658
uses: nick-invision/retry@master
5759
with:

‎Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,24 @@ standalone_edge_beta: edge_beta
139139
video:
140140
cd ./Video && docker build $(BUILD_ARGS) --build-arg NAMESPACE=$(FFMPEG_BASED_NAME) --build-arg BASED_TAG=$(FFMPEG_BASED_TAG) -t $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) .
141141

142+
count_image_layers:
143+
docker history $(NAME)/base:$(TAG_VERSION) -q | wc -l
144+
docker history $(NAME)/hub:$(TAG_VERSION) -q | wc -l
145+
docker history $(NAME)/distributor:$(TAG_VERSION) -q | wc -l
146+
docker history $(NAME)/router:$(TAG_VERSION) -q | wc -l
147+
docker history $(NAME)/sessions:$(TAG_VERSION) -q | wc -l
148+
docker history $(NAME)/session-queue:$(TAG_VERSION) -q | wc -l
149+
docker history $(NAME)/event-bus:$(TAG_VERSION) -q | wc -l
150+
docker history $(NAME)/node-base:$(TAG_VERSION) -q | wc -l
151+
docker history $(NAME)/node-chrome:$(TAG_VERSION) -q | wc -l
152+
docker history $(NAME)/node-edge:$(TAG_VERSION) -q | wc -l
153+
docker history $(NAME)/node-firefox:$(TAG_VERSION) -q | wc -l
154+
docker history $(NAME)/node-docker:$(TAG_VERSION) -q | wc -l
155+
docker history $(NAME)/standalone-chrome:$(TAG_VERSION) -q | wc -l
156+
docker history $(NAME)/standalone-edge:$(TAG_VERSION) -q | wc -l
157+
docker history $(NAME)/standalone-firefox:$(TAG_VERSION) -q | wc -l
158+
docker history $(NAME)/standalone-docker:$(TAG_VERSION) -q | wc -l
159+
docker history $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) -q | wc -l
142160

143161
# https://github.com/SeleniumHQ/docker-selenium/issues/992
144162
# Additional tags for browser images

0 commit comments

Comments
 (0)