Skip to content

Create Docker for Tilemill releases #2742

Description

@csytsma

Goal: Create a Docker image for Tilemill that works for Ubuntu, MacOS and Windows. This will help with new users to be able to easily setup and start using Tilemill.

Do we have any takers that can help create the Docker image, and add it to the repo?

Activity

  1. apbarratt commented on Jun 13, 2021

    @apbarratt

    Working on this. Once I have something actually usable, I'll come back here and figure out what the best way to contribute it will be.

  2. apbarratt commented on Jun 13, 2021

    @apbarratt

    I should probably point out that whilst I was aiming to make it reusable, it was really just a personal project so will likely need some one to fork it to make it a little more polished for sharing around =D

  3. csytsma commented on Jun 14, 2021

    @csytsma
    MemberAuthor

    @apbarratt This will be great. I have some co-workers that are big Docker users, so I'm sure I can get one of them to help "productionize" anything you create.

  4. apbarratt commented on Jun 14, 2021

    @apbarratt

    Have we a discord server anywhere for when I have quicky questions to ask? :)

  5. csytsma commented on Jun 14, 2021

    @csytsma
    MemberAuthor

    We don't. I've thought about setting up a Slack instance. I'd prefer Slack over discord. Would that work?

  6. csytsma commented on Jun 14, 2021

    @csytsma
    MemberAuthor

    @apbarratt Take a look at #2736, the Dockerfile may have already been created by someone.

  7. apbarratt commented on Jun 14, 2021

    @apbarratt

    Oh yes, there's a few of them around. But I'm wanting something a little friendlier. Something that'll just host the lot of port 80 and have the database and OSM-bright etc already there, ready to go.
    It's the last bit I'm finding tricky.

  8. apbarratt commented on Jun 14, 2021

    @apbarratt

    Here's the basic tilemill anyway. All runs using port 80, so once it's running, you can just have it loaded up by going to localhost in your browser.
    https://github.com/apbarratt/docker_tilemill

  9. Stoiker commented on Sep 17, 2021

    @Stoiker
    Contributor

    Thanks @apbarratt for your work! I am currently trying to reduce the overall image size and to create a version that will also work with podman. As one migh have guessed, the change to alpine is not straightforward and maybe someone can help me out here.

    Out of the box, one runs into linker issues:

    Error: Error relocating /tilemill/node_modules/gdal/lib/binding/node-v57-linux-x64/gdal.node: __printf_chk: symbol not found

    which can/should be solved when building gdal explicitly with shared libs
    npm install gdal --build-from-source --shared_gdal

    Which would install the most up to date version and that relies on node v 10++
    Use of a specific version
    npm install gdal@0.8.0 --build-from-source --shared_gdal
    only leads to futher compile errors with gyp

    TypeError: write() argument must be str, not bytes while trying to load binding.gyp
    gyp ERR! configure error
    gyp ERR! stack Error: gyp failed with exit code: 1
    gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
    gyp ERR! stack at emitTwo (events.js:126:13)
    gyp ERR! stack at ChildProcess.emit (events.js:214:7)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    gyp ERR! System Linux 5.13.15-100.fc33.x86_64
    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/tilemill/node_modules/mapnik/lib/binding/mapnik.node" "--module_name=mapnik" "--module_path=/tilemill/node_modules/mapnik/lib/binding"
    gyp ERR! cwd /tilemill/node_modules/mapnik
    gyp ERR! node -v v8.17.0
    gyp ERR! node-gyp -v v5.0.5
    gyp ERR! not ok

    Since I am lacking experience with the whole node dependency stack, can someone point me into the right direction?
    Thx

  10. xycarto commented on Sep 30, 2021

    @xycarto

    @csytsma Regarding your question about Slack from 15 June. That would be helpful at least for me

  11. Stoiker commented on Oct 7, 2021

    @Stoiker
    Contributor

    Just to let you know, I dumped the alpine approach and settled for a two stage build with node and node-slim images.
    PR can be found here: #2748

    Also, could someone verify if this setup is working for them as well?
    I tested it with Docker under Ubuntu 20.04.03 in a VM.

  12. xycarto commented on Dec 16, 2021

    @xycarto

    I set up and tested this on Ubuntu 20.04. No VM.

    Did as suggested in README:

    git clone https://github.com/tilemill-project/tilemill.git
    cd tilemill
    docker-compose up
    

    No issues. Runs great. Connections to my PostgreSQL databases work as expected.

    Great job

  13. Stoiker commented on Dec 16, 2021

    @Stoiker
    Contributor

    @xycarto great! Thx for testing!

  14. SaidAlSouti commented on Mar 24, 2022

    @SaidAlSouti

    Tested on Mac apple silicon. It shows error when running docker-compose
    Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/src/app/node_modules/mapnik/lib/binding/mapnik.node --module_name=mapnik --module_path=/usr/src/app/node_modules/mapnik/lib/binding' (1)

  15. Stoiker commented on Mar 24, 2022

    @Stoiker
    Contributor

    Hi @SaidAlSouti thx for your comment. Sadly, I don't own an apple silicon based device, hence I can not verify this issue.
    Can you post more output (if there is anything meaningful regarding the mapnik issue)?

  16. csytsma commented on Aug 25, 2022

    @csytsma
    MemberAuthor

    PR #2758 was created to fix Apple M1 issue, hoping someone on this thread can test and verify the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions