Commit graph

41 commits

Author SHA1 Message Date
Ralf Vogler
98b001c204 docker: comment out all labels since they're added? 2025-05-23 00:04:20 +02:00
Ralf Vogler
5d48716ef1 docker: GitHub doesn't show labels due to multi-arch image -> add annotation level index 2025-05-22 23:52:23 +02:00
Ralf Vogler
ada40d05ec docker: use metadata-action for tags and labels
https://github.com/docker/metadata-action
Packages on GitHub lack description since labels from Dockerfile are not used:
https://github.com/vogler/free-games-claimer/pkgs/container/free-games-claimer/421753259
2025-05-22 23:26:11 +02:00
Ralf Vogler
1dbbfaf3ad lint: fix most super-linter errors 2025-05-16 02:07:40 +02:00
Ralf Vogler
e5935faa13 sonarcloud fixes 2023-11-07 15:20:58 +01:00
Ralf Vogler
a62aa8c0c8 sonarcloud fix docker: Remove cache after installing packages
https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=vogler_free-games-claimer&open=AYupZi3__aoWVkCdISRI
https://sonarcloud.io/organizations/vogler/rules?open=docker%3AS6587&rule_key=docker%3AS6587&tab=how_to_fix
https://askubuntu.com/questions/3167/what-is-difference-between-the-options-autoclean-autoremove-and-clean
2023-11-07 11:53:29 +01:00
Ralf Vogler
840d35c2d2 ncu -u: playwright-firefox ^1.37.1 → ^1.38.0 2023-09-18 13:54:40 +02:00
Ralf Vogler
e30216c9b8 eg: default resolution 1280x1280 -> 1920x1080, #183 2023-09-07 13:30:49 +02:00
Ralf Vogler
c79f4cc40f docker: migrate to new nodesource repo; node 19 -> 20
old node setup script had a warning to migrate with 60s pause during docker build

https://github.com/nodesource/distributions/wiki/How-to-migrate-to-the-new-repository
2023-09-07 13:27:18 +02:00
Ralf Vogler
8a010dbcc7 docker: pass in build-args, add $NOW 2023-08-27 23:32:56 +02:00
Ralf Vogler
2eb17a1419 docker: show version via $COMMIT_SHA (and $BRANCH if not "main") 2023-08-27 18:33:27 +02:00
Ralf Vogler
682c651224 docker: use OCI labels
https://github.com/opencontainers/image-spec/blob/main/annotations.md
https://docs.docker.com/engine/reference/builder/#label

Before:
```console
$ docker image inspect --format='{{json .Config.Labels}}' ghcr.io/vogler/free-games-claimer | jq
{
  "org.opencontainers.image.ref.name": "ubuntu",
  "org.opencontainers.image.version": "22.04"
}
```

After:
```console
$ docker image inspect --format='{{json .Config.Labels}}' ghcr.io/vogler/free-games-claimer | jq
{
  "org.opencontainers.image.base.name": "ubuntu:jammy",
  "org.opencontainers.image.description": "Automatically claims free games on the Epic Games Store, Amazon Prime Gaming and GOG",
  "org.opencontainers.image.name": "free-games-claimer",
  "org.opencontainers.image.ref.name": "",
  "org.opencontainers.image.revision": "",
  "org.opencontainers.image.source": "https://github.com/vogler/free-games-claimer",
  "org.opencontainers.image.title": "free-games-claimer",
  "org.opencontainers.image.url": "https://github.com/vogler/free-games-claimer",
  "org.opencontainers.image.version": "latest"
}
```
2023-08-26 10:47:18 +02:00
Ralf Vogler
18c27ba881 use playwright-firefox such that npm install does not download other browsers 2023-02-22 00:49:58 +01:00
Ralf Vogler
1b319cacf7 docker: manually install-deps firefox: 1.12GB -> 932MB 2023-02-20 18:37:45 +01:00
Ralf Vogler
3158c5515f docker: no need for --no-install-suggests 2023-02-20 18:35:39 +01:00
Ralf Vogler
5f6d9ca830 docker: --no-install-recommends for nodejs 2023-02-20 18:32:13 +01:00
Ralf Vogler
65a389c3d9 docker: don't pin playwright, split: system deps + firefox after npm install
`npx playwright install --with-deps firefox` fails since package.json references 1.29 but current version is 1.30:
`browserType.launchPersistentContext: Executable doesn't exist at /root/.cache/ms-playwright/firefox-1369/firefox/firefox`

Need to either pin the version there or install the browser after `npm install` which will make it take into account the package.json version.
See https://github.com/microsoft/playwright/issues/13188, https://github.com/microsoft/playwright/issues/12835

Image size:

1. 1.12GB - `npx playwright install --with-deps firefox` -> fails due to wrong browser version
2. 1.12GB - `npx playwright@1.29 install --with-deps firefox` -> pinning version works, but need to also update Dockerfile when updating package.json
3. 920MB - `npx playwright install-deps firefox` -> fails, system deps only, no browser
4. 1.12GB - 3. + `npx install firefox` after `npm install` -> works, no pinning needed, system deps stuff is cleaned up with the rest of the apt installs; breaks if system deps change...
2023-02-05 23:33:45 +01:00
Ralf Vogler
88b4dcfcac also run node gog by default, closes #52 2023-01-28 13:14:42 +01:00
Ralf Vogler
01acfc2311 docker: pin playwright version since we install it before npm i
https://github.com/microsoft/playwright/issues/13188
2023-01-27 10:11:26 +01:00
Ralf Vogler
e57c2c4408 docker: pip install apprise; 1.09GB -> 1.11GB 2023-01-25 17:50:26 +01:00
Ralf Vogler
72d8550c86 docker/entrypoint.sh -> docker-entrypoint.sh 2023-01-09 20:37:13 +01:00
Ralf Vogler
792b4b3915 options: store-specific logins, drop SCREEN_ 2023-01-07 13:55:31 +01:00
Ralf Vogler
09c3e57a8a use SHOW for pg and eg, headless by default for both, but show inside Docker 2023-01-07 13:47:08 +01:00
Ralf Vogler
1c38f730ab docker: run both epic-games and prime-gaming by default 2022-12-24 15:20:45 +01:00
Ralf Vogler
67e622e6ec docker: move firefox install up to other apt deps; --with-deps needed!
Without --with-deps we get and error starting the browser:

node:internal/process/esm_loader:108
    internalBinding('errors').triggerUncaughtException(
                              ^

browserType.launchPersistentContext:
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Please install them with the following command:      ║
║                                                      ║
║     npx playwright install-deps                      ║
║                                                      ║
║ Alternatively, use apt:                              ║
║     apt-get install libgtk-3-0\                      ║
║         libasound2\                                  ║
║         libxcomposite1\                              ║
║         libpangocairo-1.0-0\                         ║
║         libpango-1.0-0\                              ║
║         libatk1.0-0\                                 ║
║         libcairo-gobject2\                           ║
║         libcairo2\                                   ║
║         libgdk-pixbuf-2.0-0\                         ║
║         libdbus-glib-1-2\                            ║
║         libxcursor1                                  ║
║                                                      ║
║ <3 Playwright Team                                   ║
╚══════════════════════════════════════════════════════╝
    at async file:///fgc/prime-gaming.js:25:17 {
  name: 'Error'
}
2022-12-24 15:02:28 +01:00
Ralf Vogler
8ce6c2fdc9 docker: hadolint: pipefail
Can't do the recommended --no-install-recommends for curl because
otherwise it has problems with certificates:

  curl: (77) error setting certificate file: /etc/ssl/certs/ca-certificates.crt
2022-12-24 14:46:40 +01:00
Ralf Vogler
3c4f79a1ed docker: upgrade Ubuntu 20.04 (focal) -> 22.04 (jammy), +60MB 2022-12-24 14:37:02 +01:00
Ralf Vogler
0ad324b756 docker: upgrade node 16 -> 19, +60MB 2022-12-23 00:28:49 +01:00
Ralf Vogler
c44d1641ea cleanup Dockerfile, merged apt runs -> saved ~90MB
Image size from 1.04GB to 952MB.
2022-12-21 09:05:30 +01:00
Ralf Vogler
34393eec76 pg: also use firefox
Dropping chromium reduced image size by ~500MB from 1.55GB to 1.04GB.
2022-12-21 01:25:32 +01:00
Ralf Vogler
ba545632f5 docker: also install firefox 2022-12-17 00:27:15 +01:00
gladiopeace
b49862060c
fix copy multiple files
when copying multiple files you need to point to a directory rather a single file "."
2022-11-30 03:16:51 +02:00
Ralf Vogler
fbc33ffcaf same resolution for docker as for browser 2022-10-20 21:20:15 +02:00
Ralf Vogler
a789034c51 clean up Dockerfile and move down config such that it does not trigger rebuild 2022-10-20 20:45:44 +02:00
Ralf Vogler
9f0e50afb6 remove VNC_PASSWORD
Usually behind firewall and process is short-lived, except for when no longer logged in.
2022-10-20 20:09:12 +02:00
Ralf Vogler
ef72506431 docker: respect package-lock.json, not just package.json 2022-10-20 19:55:42 +02:00
Kilian von Pflugk
a468ed5fed fix restart issue 2022-08-28 13:53:57 +02:00
Ralf Vogler
a1eec65869 Dockerfile: dos2unix ./docker/*.sh, #15
https://stackoverflow.com/questions/51508150/standard-init-linux-go190-exec-user-process-caused-no-such-file-or-directory
2022-05-04 02:04:04 +02:00
Trung Le
7971be297c feat: use novnc, fix Thank you for buying timeout 2022-04-09 14:50:42 +07:00
Trung Le
dbf4804dc7 fix: reduce size, fix signin redirect
* correct freegames url
* skip downloading browsers in docker
* remove fluxbox
* remove stdout for vnc & xvfb
2022-04-01 01:47:48 +07:00
Trung Le
a8c578bd93 feat: dockerize, fix sign in loop 2022-03-31 03:06:01 +07:00