lichess-bot-devs / lichess-bot

A bridge between Lichess bots and chess engines
GNU Affero General Public License v3.0
715 stars 434 forks source link

Fix docker build #950

Closed AttackingOrDefending closed 2 months ago

AttackingOrDefending commented 2 months ago

Type of pull request:

Description:

Hopefully fixed the error. Changed DOCKER_ORGANIZATION to lichessbotdevs and added GHCR_DOCKER_ORGANIZATION with a value of lichess-bot-devs. DockerHub didn't let me use hyphens in the username, so the username is lichessbotdevs. I can test whether this works on a new branch in this repo if you want before merging.

Related Issues:

949

Checklist:

Screenshots/logs (if applicable):

AttackingOrDefending commented 2 months ago

We can also remove all the VARS.variable and change them with the value, so that they are easier to debug.

MarkZH commented 2 months ago

Do the test and merge if it works.

AttackingOrDefending commented 2 months ago

After one more change, it works now.

In the GitHub container registry we have to use docker pull ghcr.io/lichess-bot-devs/lichess-bot:latest and on docker hub docker pull lichessbotdevs/lichess-bot:latest. We should probably mention that on dockerhub there are no hyphens, while there are on ghcr. I don't know how lines mentioning lichessbotdevs (e.g. FROM lichessbotdevs/lichess-bot:alpine) have to change for ghcr. I assume just adding hyphens won't be enough. @fathzer Can you help with how each mention of lichessbotdevs must change for ghcr?

fathzer commented 2 months ago

Hi,

It seems your Github package is not public ; When I'm logged out from Github, https://github.com/fathzer/lichess-bot/pkgs/container/lichess-bot shows my test repo, but https://github.com/lichess-bot-devs/lichess-bot/pkgs/container/lichess-bot results in a 404 error page.

Here is an example of how to pull an image from Github: docker pull ghcr.io/fathzer/lichess-bot. In the same way, in the run command, the image name should be prefixed by ghcr.io/.

AttackingOrDefending commented 2 months ago

It seems your Github package is not public

Thanks. Fixed it.

@MarkZH Look at the docs, and see if you agree with the changes. I don't have any other changes to make.

AttackingOrDefending commented 2 months ago

I added an action that pushes the docker docs to docker hub, and made the workflow first build the alpine image and then the main image because ghcr shows how to install the image that was pushed last.

MarkZH commented 2 months ago

Merge if ready.