-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (42 loc) · 1.54 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (42 loc) · 1.54 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# base image
FROM ubuntu:24.04
# configure env
ENV DEBIAN_FRONTEND='noninteractive'
ENV NODE_PATH=''
# update apt, install core apt dependencies and delete the apt-cache
# note: this is done in one command in order to keep down the size of intermediate containers
ADD packages.sh .
RUN bash packages.sh
# configure locale
RUN locale-gen 'en_US.UTF-8'
ENV LANG='en_US.UTF-8'
ENV LANGUAGE='en_US:en'
ENV LC_ALL='en_US.UTF-8'
# maintainer information
LABEL maintainer="team@pelias.io"
# configure directories
RUN mkdir -p '/data' '/code/pelias'
# configure volumes
VOLUME "/data"
# configure git
RUN git config --global 'user.email' 'team@pelias.io'
RUN git config --global 'user.name' 'Pelias Docker'
# install nodejs
ENV NODE_VERSION='26.9.0'
RUN git clone 'https://github.com/isaacs/nave.git' /code/nave && \
/code/nave/nave.sh 'usemain' "${NODE_VERSION}" && \
rm -rf ~/.nave /code/nave && \
npm i npm -g && \
find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "linux-x86_64" ! -name "linux-aarch64" -exec rm -rf {} \; && \
rm -rf /usr/local/lib/node_modules/npm/docs \
/usr/local/lib/node_modules/npm/man \
~/.npm
# add global install dir to $NODE_PATH
ENV NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
# get ready for pelias config with an empty file
ENV PELIAS_CONFIG='/code/pelias.json'
RUN echo '{}' > '/code/pelias.json'
# add a pelias user
RUN useradd -ms /bin/bash pelias
# ensure symlinks, pelias.json, and anything else are owned by pelias user
RUN chown pelias:pelias /data /code -R