Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
build: get number of layers in images
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Apr 17, 2024
1 parent 311b638 commit 35968ad
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
GH_ORG: ${{ vars.GH_ORG || 'SeleniumHQ' }}
- name: Build Docker images
run: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
- name: Count image layers
run: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make count_image_layers
- name: Test Docker images
uses: nick-invision/retry@master
with:
Expand Down
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,24 @@ standalone_edge_beta: edge_beta
video:
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) .

count_image_layers:
docker history $(NAME)/base:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/hub:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/distributor:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/router:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/sessions:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/session-queue:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/event-bus:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/node-base:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/node-chrome:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/node-edge:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/node-firefox:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/node-docker:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/standalone-chrome:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/standalone-edge:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/standalone-firefox:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/standalone-docker:$(TAG_VERSION) -q | wc -l
docker history $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) -q | wc -l

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

0 comments on commit 35968ad

Please sign in to comment.