-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathDockerfile
32 lines (26 loc) · 809 Bytes
/
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
28
29
30
31
32
# This docker file sets up the rails app container
#
# https://docs.docker.com/reference/builder/
FROM ruby:2.6.0-alpine
MAINTAINER Mike Heijmans <parabuzzle@gmail.com>
# Add env variables
ENV PORT=80 \
REGISTRY_HOST=localhost \
REGISTRY_PORT=5000 \
REGISTRY_PROTOCOL=https \
REGISTRY_SSL_VERIFY=true \
REGISTRY_ALLOW_DELETE=false \
APP_HOME=/webapp
RUN mkdir -p $APP_HOME
# switch to the application directory for exec commands
WORKDIR $APP_HOME
# Add the app
COPY . $APP_HOME
RUN apk add --update nodejs g++ musl-dev make linux-headers yarn && \
yarn install && \
node_modules/.bin/webpack && \
rm -rf node_modules && \
bundle install --deployment && \
apk del nodejs g++ musl-dev make linux-headers
# Run the app
CMD ["bundle", "exec", "foreman", "start"]