Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.5
FROM alpine:3.8

# Enables customized options using environment variables
ENV OSRM_BACKEND='http://localhost:5000'
Expand All @@ -12,14 +12,18 @@ RUN mkdir -p /src
COPY package.json /src

# Install app dependencies
RUN apk add --no-cache sed nodejs && \
RUN apk add --no-cache sed nodejs su-exec npm && \
cd /src && \
npm install

# Create app directory
COPY . /src
WORKDIR /src

# for dropping privileges
RUN adduser -D osrm && \
chown -R osrm /src

# Run App
EXPOSE 9966
CMD ["npm", "start"]
CMD ["su-exec", "osrm", "npm", "start"]