Skip to content
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

go-pmtiles docker image on GitHub registry #11

Merged
merged 3 commits into from
Mar 2, 2022

Conversation

fraank
Copy link
Contributor

@fraank fraank commented Mar 1, 2022

could fix #3
(sorry, first pull request was based on wrong branch)

some points to extend:

  • write proper documentation on how to use and modify
  • add testing pipeline to pass before creating a new image
  • ..

username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
repository: protomaps/go-pmtiles/go-pmtiles
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be protomaps/go-pmtiles/go-pmtiles or can it be just protomaps/go-pmtiles ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good hint. I had thought that subnaming was required. I tested it and it works great without. Even documentation does not saying sth. about it any longer. Maybe that requirement was changed recently with migration to ghct.io, or I was on the wrong path all the time. Anyway, I changed it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! will try it out.

@bdon bdon merged commit 8815454 into protomaps:master Mar 2, 2022
@bdon
Copy link
Member

bdon commented Mar 2, 2022

@fraank can you verify that the image pushed to ghcr is working? Also the build output has these two warnings:

Warning: Input 'repository' has been deprecated with message: v2 is now available through docker/build-push-action@v2
2
Warning: Unexpected input(s) 'context', valid inputs are ['entryPoint', 'args', 'username', 'password', 'registry', 'repository', 'tags', 'tag_with_ref', 'tag_with_sha', 'path', 'dockerfile', 'target', 'always_pull', 'build_args', 'cache_froms', 'labels', 'add_git_labels', 'push']

@fraank
Copy link
Contributor Author

fraank commented Mar 2, 2022

yeah, the Dockerfile is somehow "strange". I made the same mistake. This docker-compose config works for me:

  maps:
    image: ghcr.io/saunaworlds/go-pmtiles:master
    command: serve https://mybucket.s3.eu-west-1.amazonaws.com
    ports:
      -   target: 8080
          published: 8080
          protocol: tcp

@fraank
Copy link
Contributor Author

fraank commented Mar 2, 2022

@bdon Something is not working in my examples as expected and I cannot (yet) figure out if it depends on the image or usage.

I downloaded a quite big map as us.pmtiles from https://protomaps.com/downloads/large_map
Tried serving it from an S3-Bucket, or from local directory, but all requests (i tried a lot of zoom-levels and x/y positions) are failing with 2022/03/02 11:16:15 loop.go:145: failed to fetch us 0-512000.

Any idea what i missed?

@bdon
Copy link
Member

bdon commented Mar 3, 2022

@fraank I haven't had a chance to run this in detail yet, but can you confirm your container has access to the S3 bucket via either IAM roles or public bucket settings?

@fraank
Copy link
Contributor Author

fraank commented Mar 3, 2022

@bdon Yep, i can confirm that it is public available for my test. I tried it with a local directory as well.

@bdon
Copy link
Member

bdon commented Mar 5, 2022

@fraank can you try this change? #12

This switches to Alpine linux which should be more minimal and copies over the SSL cert toolchain from the image, which should make HTTPS fetches work. Details about alpine vs other image here: https://hub.docker.com/_/golang

@fraank
Copy link
Contributor Author

fraank commented Mar 7, 2022

@bdon yes, serving from S3 and local is now working. I created a small Pull Request for making docker (compose) things a little bit more elegant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker image
2 participants