Skip to content

Commit

Permalink
Merge branch 'trunk' into docker-image
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Dec 11, 2023
2 parents a76504a + a010cb0 commit 14278ea
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-dev-beta-browser-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
- name: Setup environment variables
run: |
export SELENIUM_VERSION=$(grep selenium-server Base/Dockerfile | sed 's/.*-\([^-]*\)\.jar \\/\1/' | head -n 1)
export SELENIUM_VERSION=$(grep BASE_VERSION Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1)
echo "SELENIUM_VERSION="$SELENIUM_VERSION >> $GITHUB_ENV
export BUILD_DATE=$(date '+%Y%m%d')
echo "BUILD_DATE="$BUILD_DATE >> $GITHUB_ENV
Expand Down
6 changes: 2 additions & 4 deletions NodeBase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ RUN mkdir -p /tmp/.X11-unix && \
fix-permissions /tmp/.X11-unix

#==============================
# Generating the VNC password as seluser
# So the service can be started with seluser
# Generating the VNC password based on the ${SE_VNC_PASSWORD}
# Changing ownership to ${SEL_USER}, so the service can be started
#==============================

ENV SE_VNC_PASSWORD=secret
Expand Down Expand Up @@ -180,8 +180,6 @@ ENV SE_DRAIN_AFTER_SESSION_COUNT 0
# Setting Selenium Manager to work offline
ENV SE_OFFLINE true



#========================
# Selenium Configuration
#========================
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1320,3 +1320,26 @@ docker run -d -p 4444:4444 --shm-size="2g" \
-v /home/ubuntu/files:/tmp/downloads \
selenium/standalone-chrome:4.16.1-20231208
```

### Change ownership of the volume mount

If you are using Linux and you need to change the ownership of the volume mount, you can set the `CHOWN_EXTRA` and `CHOWN_EXTRA_OPTS` (default is set `-R` - change recursively) environment variables

```bash
docker run -d -p 4444:4444 --shm-size="2g" \
-v /home/ubuntu/my-certs:/etc/certs \
-e CHOWN_EXTRA=/etc/certs \
selenium/standalone-chrome:4.16.1-20231208
```

If you want a new volume mount directory to be created and set ownership, you can set the `MKDIR_EXTRA` and `MKDIR_EXTRA_OPTS` (default is set `-p` - create a directory hierarchy) environment variables.

```bash
docker run -d -p 4444:4444 --shm-size="2g" \
-v /home/ubuntu/my-nssdb:/home/seluser/.pki/nssdb \
-e MKDIR_EXTRA=/home/seluser/.pki/nssdb \
selenium/standalone-chrome:4.16.1-20231208
```

Both `CHOWN_EXTRA` and `MKDIR_EXTRA` can be set to multiple directories by separating them with a `space` or `comma`. For example: `CHOWN_EXTRA=<some-dir>,<some-other-dir>`

0 comments on commit 14278ea

Please sign in to comment.