Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker work #285

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
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"]