-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Dockerfile
28 lines (23 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM node:current-alpine
WORKDIR /app
ADD package.json package-lock.json postinstall.js /app/
RUN npm install
ADD app.js index.js /app/
RUN apk add --no-cache curl && \
mkdir -p \
/app/geonames_dump/admin1_codes \
/app/geonames_dump/admin2_codes \
/app/geonames_dump/all_countries \
/app/geonames_dump/alternate_names \
/app/geonames_dump/cities && \
cd /app/geonames_dump && \
curl -L -o admin1_codes/admin1CodesASCII.txt http://download.geonames.org/export/dump/admin1CodesASCII.txt && \
curl -L -o admin2_codes/admin2Codes.txt http://download.geonames.org/export/dump/admin2Codes.txt && \
curl -L -o all_countries/allCountries.zip http://download.geonames.org/export/dump/allCountries.zip && \
curl -L -o alternate_names/alternateNames.zip http://download.geonames.org/export/dump/alternateNames.zip && \
curl -L -o cities/cities500.zip http://download.geonames.org/export/dump/cities500.zip && \
cd all_countries && unzip allCountries.zip && rm allCountries.zip && cd .. && \
cd cities && unzip cities500.zip && rm cities500.zip && cd .. && \
cd alternate_names && unzip alternateNames.zip && rm alternateNames.zip
ENTRYPOINT ["npm"]
CMD ["start"]