-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Add docker-compose file for streamlined setup #31
Comments
There's only one service. What advantages would such a file bring over |
Docker Compose allows for Portainer deployments and eliminates the need to install Node on the host machine outside the container. As someone new to the world of Docker, this is more user-friendly and would be much appreciated. |
(You don't need node on the host, you can also just run the |
Here's a version: '3.3'
services:
free-games-claimer:
image: free-games-claimer:latest
container_name: free-games-claimer
ports:
- '5900:5900'
- '6080:6080'
volumes:
- /path/to/data:/fgc/data
restart: unless-stopped |
works for first run of a container but then fails with: free-games-claimer | 16/10/2022 15:29:57 passing arg to libvncserver: -rfbport free-games-claimer | 16/10/2022 15:29:57 passing arg to libvncserver: 5900 free-games-claimer | 16/10/2022 15:29:57 passing arg to libvncserver: -passwd free-games-claimer | 16/10/2022 15:29:57 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 8 free-games-claimer | 16/10/2022 15:29:57 XOpenDisplay(":1.0") failed. free-games-claimer | 16/10/2022 15:29:57 Trying again with XAUTHLOCALHOSTNAME=localhost ... free-games-claimer | free-games-claimer | 16/10/2022 15:29:57 *************************************** free-games-claimer | 16/10/2022 15:29:57 *** XOpenDisplay failed (:1.0) free-games-claimer | free-games-claimer | *** x11vnc was unable to open the X DISPLAY: ":1.0", it cannot continue. free-games-claimer | *** There may be "Xlib:" error messages above with details about the failure. ... free-games-claimer | browserType.launchPersistentContext: free-games-claimer | ╔════════════════════════════════════════════════════════════════════════════════════════════════╗ free-games-claimer | ║ Looks like you launched a headed browser without having a XServer running. ║ free-games-claimer | ║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. ║ free-games-claimer | ║ ║ free-games-claimer | ║ <3 Playwright Team ║ free-games-claimer | ╚════════════════════════════════════════════════════════════════════════════════════════════════╝
I removed I used the following which also builds the image if needed (I'll try to add some GitHub action to push the image to DockerHub): services:
free-games-claimer:
container_name: free-games-claimer
# image: free-games-claimer:latest
build: .
ports:
- '5900:5900'
- '6080:6080'
volumes:
- ./data:/fgc/data I deleted the image and ran $ docker compose up
[+] Running 1/0
⠿ Container free-games-claimer Created 0.0s
Attaching to free-games-claimer
free-games-claimer | 16/10/2022 15:29:57 passing arg to libvncserver: -rfbport
free-games-claimer | 16/10/2022 15:29:57 passing arg to libvncserver: 5900
free-games-claimer | 16/10/2022 15:29:57 passing arg to libvncserver: -passwd
free-games-claimer | 16/10/2022 15:29:57 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 8
free-games-claimer | 16/10/2022 15:29:57 XOpenDisplay(":1.0") failed.
free-games-claimer | 16/10/2022 15:29:57 Trying again with XAUTHLOCALHOSTNAME=localhost ...
free-games-claimer |
free-games-claimer | 16/10/2022 15:29:57 ***************************************
free-games-claimer | 16/10/2022 15:29:57 *** XOpenDisplay failed (:1.0)
free-games-claimer |
free-games-claimer | *** x11vnc was unable to open the X DISPLAY: ":1.0", it cannot continue.
free-games-claimer | *** There may be "Xlib:" error messages above with details about the failure.
...
free-games-claimer | browserType.launchPersistentContext:
free-games-claimer | ╔════════════════════════════════════════════════════════════════════════════════════════════════╗
free-games-claimer | ║ Looks like you launched a headed browser without having a XServer running. ║
free-games-claimer | ║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. ║
free-games-claimer | ║ ║
free-games-claimer | ║ <3 Playwright Team ║
free-games-claimer | ╚════════════════════════════════════════════════════════════════════════════════════════════════╝
free-games-claimer | =========================== logs ===========================
free-games-claimer | <launching> /root/.cache/ms-playwright/chromium-1028/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --no-sandbox --hide-crash-restore-bubble --disable-extensions-except=/fgc/nopecha --load-extension=/fgc/nopecha --user-data-dir=/fgc/data/browser --remote-debugging-pipe about:blank
free-games-claimer | <launched> pid=84
free-games-claimer | [pid=84][err] [84:84:1016/152958.235130:ERROR:ozone_platform_x11.cc(239)] Missing X server or $DISPLAY
free-games-claimer | [pid=84][err] [84:84:1016/152958.235177:ERROR:env.cc(255)] The platform failed to initialize. Exiting.
free-games-claimer | ============================================================
free-games-claimer | at async file:///fgc/epic-games.js:30:17 {
free-games-claimer | name: 'Error'
free-games-claimer | }
free-games-claimer exited with code 1 Only after deleting the container, it works again: $ docker compose up
[+] Running 2/2
⠿ Network free-games-claimer_default Created 0.0s
⠿ Container free-games-claimer Created 0.1s
Attaching to free-games-claimer
free-games-claimer | 16/10/2022 15:34:33 passing arg to libvncserver: -rfbport
free-games-claimer | 16/10/2022 15:34:33 passing arg to libvncserver: 5900
free-games-claimer | 16/10/2022 15:34:33 passing arg to libvncserver: -passwd
free-games-claimer | 16/10/2022 15:34:33 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 9
free-games-claimer | 16/10/2022 15:34:33 Using X display :1.0
free-games-claimer | 16/10/2022 15:34:33 rootwin: 0x50e reswin: 0x200001 dpy: 0xfd6df140
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 ------------------ USEFUL INFORMATION ------------------
free-games-claimer | 16/10/2022 15:34:33 X DAMAGE available on display, using it for polling hints.
free-games-claimer | 16/10/2022 15:34:33 To disable this behavior use: '-noxdamage'
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 Most compositing window managers like 'compiz' or 'beryl'
free-games-claimer | 16/10/2022 15:34:33 cause X DAMAGE to fail, and so you may not see any screen
free-games-claimer | 16/10/2022 15:34:33 updates via VNC. Either disable 'compiz' (recommended) or
free-games-claimer | 16/10/2022 15:34:33 supply the x11vnc '-noxdamage' command line option.
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 Wireframing: -wireframe mode is in effect for window moves.
free-games-claimer | 16/10/2022 15:34:33 If this yields undesired behavior (poor response, painting
free-games-claimer | 16/10/2022 15:34:33 errors, etc) it may be disabled:
free-games-claimer | 16/10/2022 15:34:33 - use '-nowf' to disable wireframing completely.
free-games-claimer | 16/10/2022 15:34:33 - use '-nowcr' to disable the Copy Rectangle after the
free-games-claimer | 16/10/2022 15:34:33 moved window is released in the new position.
free-games-claimer | 16/10/2022 15:34:33 Also see the -help entry for tuning parameters.
free-games-claimer | 16/10/2022 15:34:33 You can press 3 Alt_L's (Left "Alt" key) in a row to
free-games-claimer | 16/10/2022 15:34:33 repaint the screen, also see the -fixscreen option for
free-games-claimer | 16/10/2022 15:34:33 periodic repaints.
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 XFIXES available on display, resetting cursor mode
free-games-claimer | 16/10/2022 15:34:33 to: '-cursor most'.
free-games-claimer | 16/10/2022 15:34:33 to disable this behavior use: '-cursor arrow'
free-games-claimer | 16/10/2022 15:34:33 or '-noxfixes'.
free-games-claimer | 16/10/2022 15:34:33 using XFIXES for cursor drawing.
free-games-claimer | 16/10/2022 15:34:33 GrabServer control via XTEST.
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 Scroll Detection: -scrollcopyrect mode is in effect to
free-games-claimer | 16/10/2022 15:34:33 use RECORD extension to try to detect scrolling windows
free-games-claimer | 16/10/2022 15:34:33 (induced by either user keystroke or mouse input).
free-games-claimer | 16/10/2022 15:34:33 If this yields undesired behavior (poor response, painting
free-games-claimer | 16/10/2022 15:34:33 errors, etc) it may be disabled via: '-noscr'
free-games-claimer | 16/10/2022 15:34:33 Also see the -help entry for tuning parameters.
free-games-claimer | 16/10/2022 15:34:33 You can press 3 Alt_L's (Left "Alt" key) in a row to
free-games-claimer | 16/10/2022 15:34:33 repaint the screen, also see the -fixscreen option for
free-games-claimer | 16/10/2022 15:34:33 periodic repaints.
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 XKEYBOARD: number of keysyms per keycode 7 is greater
free-games-claimer | 16/10/2022 15:34:33 than 4 and 51 keysyms are mapped above 4.
free-games-claimer | 16/10/2022 15:34:33 Automatically switching to -xkb mode.
free-games-claimer | 16/10/2022 15:34:33 If this makes the key mapping worse you can
free-games-claimer | 16/10/2022 15:34:33 disable it with the "-noxkb" option.
free-games-claimer | 16/10/2022 15:34:33 Also, remember "-remap DEAD" for accenting characters.
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 X FBPM extension not supported.
free-games-claimer | Xlib: extension "DPMS" missing on display ":1.0".
free-games-claimer | 16/10/2022 15:34:33 X display is not capable of DPMS.
free-games-claimer | 16/10/2022 15:34:33 --------------------------------------------------------
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 Default visual ID: 0x21
free-games-claimer | 16/10/2022 15:34:33 Read initial data from X display into framebuffer.
free-games-claimer | 16/10/2022 15:34:33 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5760
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 X display :1.0 is 32bpp depth=24 true color
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 Listening for VNC connections on TCP port 5900
free-games-claimer | 16/10/2022 15:34:33 Listening for VNC connections on TCP6 port 5900
free-games-claimer | 16/10/2022 15:34:33 listen6: bind: Address already in use
free-games-claimer | 16/10/2022 15:34:33 Not listening on IPv6 interface.
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 Xinerama is present and active (e.g. multi-head).
free-games-claimer | 16/10/2022 15:34:33 Xinerama: number of sub-screens: 1
free-games-claimer | 16/10/2022 15:34:33 Xinerama: no blackouts needed (only one sub-screen)
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer | 16/10/2022 15:34:33 fb read rate: 2553 MB/sec
free-games-claimer | 16/10/2022 15:34:33 fast read: reset -wait ms to: 10
free-games-claimer | 16/10/2022 15:34:33 fast read: reset -defer ms to: 10
free-games-claimer | 16/10/2022 15:34:33 The X server says there are 10 mouse buttons.
free-games-claimer | 16/10/2022 15:34:33 screen setup finished.
free-games-claimer | 16/10/2022 15:34:33
free-games-claimer |
free-games-claimer | The VNC desktop is: ec3d646d3b69:0
free-games-claimer |
free-games-claimer | ******************************************************************************
free-games-claimer | Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
free-games-claimer |
free-games-claimer | The scheme stores pixel data offscreen on the VNC viewer side for faster
free-games-claimer | retrieval. It should work with any VNC viewer. Try it by running:
free-games-claimer |
free-games-claimer | x11vnc -ncache 10 ...
free-games-claimer |
free-games-claimer | One can also add -ncache_cr for smooth 'copyrect' window motion.
free-games-claimer | More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching
free-games-claimer |
free-games-claimer | PORT=5900
free-games-claimer | WebSocket server settings:
free-games-claimer | - Listen on :6080
free-games-claimer | - Web server. Web root: /usr/share/novnc
free-games-claimer | - No SSL/TLS support (no cert file)
free-games-claimer | - Backgrounding (daemon)
free-games-claimer | Not signed in anymore. Please login and then navigate to the 'Free Games' page. If using docker, open http://localhost:6080
^CGracefully stopping... (press Ctrl+C again to force)
[+] Running 1/1
⠿ Container free-games-claimer Stopped 0.6s
canceled |
I also see this issue on a headless |
The problem is that When you Ctrl-C out of the container, it seems to keep the old X display Workarounds:
https://stackoverflow.com/questions/47207616/auto-remove-container-with-docker-compose-yml |
After |
Ok, just noticed that this reversed the situation such that it can't find the X display directly after build: $ docker compose up
[+] Running 0/1
⠿ free-games-claimer Error 2.4s
[+] Building 102.1s (16/16) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2.00kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:focal 1.5s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 69.81kB 0.1s
=> CACHED [ 1/10] FROM docker.io/library/ubuntu:focal@sha256:9c2004872a3a9fcec8cc757ad65c042de1dad4da27de4c70739a6e36402213e3 0.0s
=> [ 2/10] RUN apt-get update && apt-get install -y curl wget && curl -sL https://deb.nodesource.com/setup_16.x | bash - && 26.0s
=> [ 3/10] RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y xvfb ca-certificates 22.1s
=> [ 4/10] RUN ln -s /usr/share/novnc/vnc_auto.html /usr/share/novnc/index.html 0.2s
=> [ 5/10] WORKDIR /fgc 0.0s
=> [ 6/10] COPY package*.json . 0.0s
=> [ 7/10] RUN npm install && npx playwright install --with-deps chromium && apt-get clean && rm -rf /var/lib/apt/lists/* 43.7s
=> [ 8/10] COPY . . 0.2s
=> [ 9/10] RUN dos2unix ./docker/*.sh 0.4s
=> [10/10] RUN mv ./docker/entrypoint.sh /usr/local/bin/entrypoint && chmod +x /usr/local/bin/entrypoint 0.3s
=> exporting to image 7.5s
=> => exporting layers 7.5s
=> => writing image sha256:bae707a05a9c695b7f9a4ad53ecc447fea55f1463f2576fe9e12155fca8cfa41 0.0s
=> => naming to docker.io/library/free-games-claimer 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 2/2
⠿ Network free-games-claimer_default Created 0.1s
⠿ Container fgc Created 0.2s
Attaching to fgc
fgc | 20/10/2022 18:37:49 passing arg to libvncserver: -rfbport
fgc | 20/10/2022 18:37:49 passing arg to libvncserver: 5900
fgc | 20/10/2022 18:37:49 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 10
fgc | 20/10/2022 18:37:49 XOpenDisplay(":1.0") failed.
fgc | 20/10/2022 18:37:49 Trying again with XAUTHLOCALHOSTNAME=localhost ...
fgc |
fgc | 20/10/2022 18:37:49 ***************************************
fgc | 20/10/2022 18:37:49 *** XOpenDisplay failed (:1.0)
fgc |
fgc | *** x11vnc was unable to open the X DISPLAY: ":1.0", it cannot continue.
fgc | *** There may be "Xlib:" error messages above with details about the failure. Afterwards it works when attaching to the existing container and also when it is recreating it. |
Mh, couldn't reproduce anymore. |
I'm seeing an error and then the container exits with the following
version: '3.4'
services:
free-games-claimer:
container_name: fgc
image: voglerr/free-games-claimer:latest
ports:
- 5900:5900
- 6080:6080
volumes:
- /path/to/data:/fgc/data |
I built it on an M1 Mac without Buildx, so it's only |
Try |
Nice! I successfully deployed on my headless server using this I did consistently get an "Invalid response" error when the extension tried to resolve the hCaptcha, but I just connected to the VNC and manually solved it - no issues since. services:
free-games-claimer:
container_name: fgc
image: voglerr/free-games-claimer:latest
ports:
- 5900:5900
- 6080:6080
volumes:
- /path/to/data:/fgc/data
|
I also got captchas during login yesterday. Did you also get one during claiming? |
I'm wondering what to put in the readme. Apparently there's no way to run the docker compose file without first checking out the repository:
$ curl https://github.com/vogler/free-games-claimer/main/docker-compose.yml | docker compose -f - up
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 315 100 315 0 0 4061 0 --:--:-- --:--:-- --:--:-- 4772
[+] Running 11/11
⠿ free-games-claimer Pulled 47.2s
⠿ 514fa78e57ce Already exists 0.0s
⠿ 286f5648b9b4 Pull complete 29.6s
⠿ 88adb4e1e799 Pull complete 33.8s
⠿ cb3ee3a7392e Pull complete 33.9s
⠿ 9e9e337d17c5 Pull complete 34.0s
⠿ bdc4d5426092 Pull complete 34.2s
⠿ 4acbf4c66804 Pull complete 45.2s
⠿ 5a539c0923f2 Pull complete 45.4s
⠿ efdd23c954b4 Pull complete 45.5s
⠿ 465c44205938 Pull complete 45.6s
[+] Building 0.0s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2B 0.0s
=> CANCELED [internal] load .dockerignore 0.0s
=> => transferring context: 0.0s
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount2209765762/Dockerfile: no such file or directory So it's Also, it's unclear whether to use Docker Hub ( |
I mentioned all the approaches in the readme and used |
I believe I had Captchas at both login and claiming the games, but only the login Captcha failed with the "Invalid response" error. For what it's worth, I am deploying |
Ok, thanks, good to know. |
Any plans to support Prime Gaming with Docker (+ docker-compose)? Would be nice to see all supported services in one image! |
It should already work. Just let the container run |
No description provided.
The text was updated successfully, but these errors were encountered: