thanks for Overv's demo and think8848
First your OS must suport Docker
docker pull abc3660170/startosm
docker volume create --driver local --opt type=nfs --opt device=/path/to/pgdata --opt o=bind --name pgdata
docker volume create --driver local --opt type=nfs --opt device=/path/to/tilescache --opt o=bind --name tilescache
docker run --rm -it -e MAX_MEM=6000 -v pgdata:/home/pgdata -v /absolutePath/to/XXXX.pbf:/data.osm.pbf abc3660170/startosm import
1. MAX_MEM : The maximum memory you can allocate
1. THREADS :Set Configure according to the CPU cores number
1. SHARED_BUFFER : PG database configure
1. WORK_MEM :PG database configure
1. MAINTENANCE_WORK_MEM :PG database configure
1. EFFECTIVE_CACHE_SIZE :PG database configure
PBF file download from https://download.geofabrik.de/
docker run -p 3000:3000 -e THREADS=2 -d -v pgdata:/home/pgdata -v tilescache:/home/tilecache --name osmserver abc3660170/startosm run
If tileserver startup,you can access: http://ip:3000/test.html