-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (35 loc) · 1.01 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
FROM ruby:3.0.3-slim AS ruby
RUN gem update bundler
FROM openjdk:11-jre-slim
COPY --from=ruby /usr/local/bin/ /usr/local/bin/
COPY --from=ruby /usr/local/lib/ /usr/local/lib/
COPY --from=ruby /usr/local/etc/ /usr/local/etc/
COPY --from=ruby /usr/local/include/ /usr/local/include/
COPY --from=ruby /usr/local/bundle /usr/local/bundle
# init
ENV LANG="C.UTF-8" \
TZ="Asia/Tokyo" \
GEM_HOME="/usr/local/bundle" \
BUNDLE_APP_CONFIG="/usr/local/bundle" \
BUNDLE_SILENCE_ROOT_WARNING="1" \
BUNDLE_GEMFILE="/usr/src/mogura/Gemfile" \
RUBYLIB="/usr/src/mogura" \
DIGDAG_VERSION="0.10.4"
## dependencies
RUN apt-get update && apt-get install -y \
curl \
build-essential \
git \
libyaml-dev \
libssl-dev \
libreadline-dev \
default-libmysqlclient-dev \
zlib1g-dev \
jlha-utils \
&& apt-get clean
# digdag
RUN curl -o /usr/local/bin/digdag --create-dirs -fL "https://dl.digdag.io/digdag-${DIGDAG_VERSION}" \
&& chmod +x /usr/local/bin/digdag
WORKDIR /usr/src/mogura
ADD . .
RUN bin/setup