From 15d246c6181d72e91123bca89c032db9b50df754 Mon Sep 17 00:00:00 2001 From: ABeltramo Date: Sun, 29 Aug 2021 10:21:15 +0100 Subject: [PATCH] fix: moved SHM_SIZE to .env fixed gh action for Docker hub --- .env | 1 + .github/workflows/docker-build.yml | 11 +---------- docker-compose.yml | 4 ++-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.env b/.env index 78bdb6d3..2672f689 100644 --- a/.env +++ b/.env @@ -5,6 +5,7 @@ local_state=./local_state # Use 'service:xorg' if running on a recent enough docker-compose version # Use 'host' if your Docker version can't support the service format SHARED_IPC=host +SHM_SIZE=500M # Use 'shareable' with service:xorg # Use 'host' with 'host' XORG_IPC=host diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 2178e257..141e3517 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -48,16 +48,7 @@ jobs: PUSH=false if [ -n "${{ secrets.DOCKERHUB_TOKEN }}" ]; then - if [ -n "${{ secrets.DOCKERHUB_ORG }}" ]; then - # If explicitly set org, use it - IMAGES="${{ secrets.DOCKERHUB_ORG }}/${{ matrix.image.name }}" - elif [[ $github.repository_owner == games-on-whales ]]; then - # For oficial repository, github and org names do not match - IMAGES="gameonwhales/${{ matrix.image.name }}" - else - # By default, assume docker and github org names match - IMAGES="${{ github.repository_owner }}/${{ matrix.image.name }}" - fi + IMAGES="${{ secrets.DOCKERHUB_ORG }}/${{ matrix.image.name }}" PUSH=true echo ::set-output name=has_docker_token::true fi diff --git a/docker-compose.yml b/docker-compose.yml index b0121818..b854884f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -138,7 +138,7 @@ services: - type: tmpfs target: /dev/shm tmpfs: - size: 500M + size: ${SHM_SIZE} ipc: ${SHARED_IPC} # Needed for MIT-SHM, removing this should cause a performance hit see https://github.com/jessfraz/dockerfiles/issues/359 environment: DISPLAY: ${XORG_DISPLAY} @@ -179,7 +179,7 @@ services: # - type: tmpfs # target: /dev/shm # tmpfs: - # size: 500M + # size: ${SHM_SIZE} # ipc: ${SHARED_IPC} # Needed for MIT-SHM, removing this should cause a performance hit see https://github.com/jessfraz/dockerfiles/issues/359 # environment: # DISPLAY: ${XORG_DISPLAY}