Public | Automated Build

Last pushed: 9 days ago
Short Description
Topojson in docker
Full Description

Topojson in Docker

This repo avails the commandline tool, topojson in a docker image.

The sample ENTRYPOINT script docker-entrypoint.sh provided uses gosu to switch user so that subsequent processes are run as non-root user.

Usage

  • docker-compose.yml

Craft your own docker-compose.yml by using the example below and tailor it for your needs. Replace the placeholder {} with the correct value.

version: '2'
services:
  topojson:
    build:
      context: .
    environment:
    - RUNUSER_UID=1000
    - RUNUSER_HOME=/data
    volumes:
    - ./docker-entrypoint.sh:/docker-entrypoint.sh:ro
    - {path_to_data_directory}:/data
    entrypoint:
    - /docker-entrypoint.sh
    command:
    - topojson
    - --quantization=1e5
    - --out=output.json
    - input.json

To use autobuilt image on Docker hub instead of building from Dockerfile, replace

build:
  context: .

with

image: cheewai/topojson

If you're using docker-entrypoint.sh, you can override the container runtime numeric user-id to your own by setting the environment variable RUNUSER_UID to avoid input/output file permission issue. The script sets the runtime user home directory and current working directory to /data by default. It can be changed using the environment variable RUNUSER_HOME.

In this example, both the input and output files are to be found in {path_to_data_directory} (mapped to /data/* within the container).

docker-compose -f docker-compose.yml up
Docker Pull Command
Owner
cheewai
Source Repository

Comments (0)