forked from OLA-Simple/OLASimple-Aquarium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (48 loc) · 1.34 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
ARG RUBY_VERSION=2.6.5
ARG ALPINE_VERSION=3.11
FROM ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION} AS aquarium
RUN apk update && apk add \
bind-tools \
build-base \
file \
git \
imagemagick \
iptables \
libgcrypt-dev \
libxml2 \
libxslt \
mariadb-dev \
musl \
mysql-client \
nodejs \
nodejs-npm \
openjdk8-jre \
openssl \
shared-mime-info \
sqlite-dev \
tzdata \
yarn
RUN mkdir /aquarium
# directories used by puma configuration in production
RUN mkdir -p /aquarium/shared/sockets
RUN mkdir -p /aquarium/shared/log
RUN mkdir -p /aquarium/shared/pids
WORKDIR /aquarium
# install js components
COPY package.json ./package.json
COPY yarn.lock ./yarn.lock
RUN yarn install --modules-folder public/node_modules && yarn cache clean
# Change where bundler puts gems
# see https://bundler.io/v2.0/guides/bundler_docker_guide.html
ENV GEM_HOME="/usr/local/bundle"
ENV PATH $GEM_HOME/bin:$GEM_HOME/gems/bin:$PATH
# Install gems needed by Aquarium
COPY Gemfile Gemfile.lock ./
RUN gem update --system
# rails 4.2.11.1 requires bundler < 2.0
RUN gem install bundler:2.0.0.pre.3 && \
bundle _2.0.0.pre.3_ install --jobs 20 --retry 5
COPY . ./
# include entrypoint scripts for starting Aquarium and Krill
RUN chmod +x ./docker/aquarium-entrypoint.sh
RUN chmod +x ./docker/krill-entrypoint.sh