Skip to content

User Guide (Docker)

Trung Le edited this page Jun 30, 2021 · 29 revisions

Intro

Package links

Example / Quickstart

Use EFC via Docker image

Prerequisites

Export your EpicGames secrets

  • Download DeviceAuthGenerator for EpicGames. Currently only Windows binary is supported. For Mac/Linux user, follow the guide in README.
  • Follow the User Guide
  • After exporting, you should have a file device_auths.json.

Install Docker

Install Docker Desktop on your PC. Make sure Docker is running.

Install Docker Engine if you're using non-PC system.

Docker version should be >= 20.10.7.

Run EFC via Docker

Open CMD/Powerbash/Terminal and make sure it is currently in the folder that has device_auths.json.

For specific version, replace latest with the version tag that is supported in EFC GithubPackage

To save claim history, create history.json with content of {} or download the file from master. Then you can use "using local history.json" command.

Windows

Run this command:

docker run --rm --pull always -it --volume "%cd%/device_auths.json:/app/device_auths.json" ghcr.io/jackblk/epicgames-freebies-claimer:latest

Using your local history.json:

docker run --rm --pull always -it --volume "%cd%/device_auths.json:/app/device_auths.json" --volume "%cd%/history.json:/app/history.json" ghcr.io/jackblk/epicgames-freebies-claimer:latest

Mac/Linux

Run this command:

docker run --rm --pull always -it --volume "$(pwd)/device_auths.json:/app/device_auths.json" ghcr.io/jackblk/epicgames-freebies-claimer:latest

Using your local history.json:

docker run --rm --pull always -it --volume "$(pwd)/device_auths.json:/app/device_auths.json" --volume "$(pwd)/history.json:/app/history.json" ghcr.io/jackblk/epicgames-freebies-claimer:latest

Developer Guide 🚀

This guide is for Mac/Linux, but it is nearly the same for Windows. Alter it a bit if you're using Windows 😄.

Build & Test locally

Note: This will only build for 1 platform on your system. To build for other architectures (ARM-based), read chapter "Pushing images".

To build and test the image locally, use:

docker build --rm -t epicgames-freebies-claimer .

Test locally:

# Without `history.json`
docker run --rm -it \
    --volume "$(pwd)/device_auths.json:/app/device_auths.json" \
    epicgames-freebies-claimer

# With local `history.json`
docker run --rm -it \
    --volume "$(pwd)/device_auths.json:/app/device_auths.json" \
    --volume "$(pwd)/history.json:/app/history.json" \
    epicgames-freebies-claimer

Authenticate to DockerHub/GithubPackage

Push images

MAKE SURE YOUR LOCAL IMAGE WORKS before using below commands. It it build and push to the registries.

Notes:

docker buildx build --rm \
    --platform linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7,linux/arm/v6 \
    --push \
    -t ghcr.io/jackblk/epicgames-freebies-claimer:latest \
    -t ghcr.io/jackblk/epicgames-freebies-claimer:1.5.3 \
    -t jackblk/epicgames-freebies-claimer:latest \
    -t jackblk/epicgames-freebies-claimer:1.5.3 \
    .