Skip to content

Commit

Permalink
Fix running tests in docker with latest node-libcurl deps, move to bu…
Browse files Browse the repository at this point in the history
…ildx command
  • Loading branch information
younglim committed Aug 10, 2024
1 parent 4a2acf4 commit c81ca36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM mcr.microsoft.com/playwright:v1.42.1-jammy
WORKDIR /app

# Installation of packages for purple-a11y
RUN apt-get update && apt-get install -y zip git tree openjdk-11-jdk xvfb libgbm-dev libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth dbus-x11 && \
RUN apt-get update && apt-get install -y zip git tree openjdk-11-jdk xvfb libgbm-dev libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth dbus-x11 python-is-python3 libcurl4-openssl-dev build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
9 changes: 7 additions & 2 deletions shell_scripts/start_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ if [ "$(docker ps -a | grep purple-a11y-tests-instance)" ]; then
docker rm -f purple-a11y-tests-instance
fi

# Build the Docker container
docker build -t purple-a11y-tests .
# Build the Docker container (Legacy builder)
# docker build -t purple-a11y-tests .

# Build the Docker container using buildx
# Refer to MacOS (Colima) steps here to install buildx:
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#installing-buildx
docker buildx build -t purple-a11y-tests -f Dockerfile .

# Add hostname mappings and run the container
docker run -dit --name purple-a11y-tests-instance --add-host=main.purplea11y.local:0.0.0.0 --add-host=diffHostname.purplea11y.local:0.0.0.0 --add-host=docs.google.com:0.0.0.0 purple-a11y-tests
Expand Down

0 comments on commit c81ca36

Please sign in to comment.