Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Generalized config parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
johnerikhalse committed Jan 20, 2017
1 parent d91ce34 commit da3ca5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ EXPOSE 9222
ADD start.sh import_cert.sh /usr/bin/

VOLUME /data
ENV HOME=/data PROXY=proxy:8080
ENV HOME=/data DEBUG_ADDRESS=0.0.0.0 DEBUG_PORT=9222

CMD ["/usr/bin/start.sh"]

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# docker-chrome-headless

docker run -it --rm -p=0.0.0.0:9222:9222 --name=chrome-headless -e "PROXY=localhost:8080" -v /tmp/chromedata/:/data norsknettarkiv/chrome-headless
docker run -it --rm -p=0.0.0.0:9222:9222 --name=chrome-headless -e "CHROME_OPTS=--proxy-server=localhost:8080" -v /tmp/chromedata/:/data norsknettarkiv/chrome-headless

18 changes: 7 additions & 11 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
# Run the NSSDB updating utility in background
import_cert.sh $HOME &

CHROME_ARGS="--disable-gpu --headless --no-sandbox --remote-debugging-address=$DEBUG_ADDRESS --remote-debugging-port=$DEBUG_PORT --user-data-dir=/data"

if [ -n "$CHROME_OPTS" ]; then
CHROME_ARGS="${CHROME_ARGS} ${CHROME_OPTS}"
fi

# Start Chrome
exec /usr/bin/google-chrome-unstable \
--disable-gpu \
--headless \
--ignore-certificate-errors \
--disable-web-security \
--allow-running-insecure-content \
--proxy-server=$PROXY \
--remote-debugging-address=0.0.0.0 \
--remote-debugging-port=9222 \
--user-data-dir=/data \
--no-sandbox
exec sh -c "/usr/bin/google-chrome-unstable $CHROME_ARGS"

0 comments on commit da3ca5e

Please sign in to comment.