Skip to content

Commit f8e457c

Browse files
authored
chore(docker): reduce image byte size (#140)
1 parent 1d9d7eb commit f8e457c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.dockerignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.git
22
.gitignore
3-
.circleci
4-
.travis.yml
53
Dockerfile
64
.dockerignore
75
node_modules
@@ -12,7 +10,10 @@ tmp
1210
package-lock.json
1311
*.md
1412
*.db
13+
*.db*
1514
*.db-journal
1615
*.geojson
16+
*.geojsonl
1717
*.gz
18+
*.zip
1819
.tap

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM pelias/baseimage
33
# install commands used by bin/download script
44
RUN apt-get update && \
55
apt-get install -y jq lbzip2 pigz zstd && \
6+
apt-get clean && \
67
rm -rf /var/lib/apt/lists/*
78

89
# working directory
@@ -15,7 +16,8 @@ COPY . /code
1516
RUN npm install && \
1617
npm run env_check && \
1718
npm test && \
18-
npm prune --production
19+
npm prune --production && \
20+
rm -rf ~/.npm /tmp/*
1921

2022
# entrypoint
2123
ENTRYPOINT ["node", "bin/spatial.js"]

0 commit comments

Comments
 (0)