forked from betadots/hdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (49 loc) · 1.64 KB
/
Copy pathDockerfile
File metadata and controls
63 lines (49 loc) · 1.64 KB
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
59
60
61
62
63
FROM docker.io/library/ruby:3.4.9-alpine3.23 AS builder
RUN apk update \
&& apk upgrade \
&& apk add --no-cache --update \
git \
sqlite \
alpine-sdk \
libxml2-dev \
libxslt-dev \
yaml-dev \
tzdata \
bash \
libffi-dev # required for the fiddle gem, transitive openvox dependency
ENV APP_HOME=/hdm
WORKDIR $APP_HOME
COPY . $APP_HOME
COPY config/hdm.yml.template $APP_HOME/config/hdm.yml
RUN bundle check || (bundle config set --local without 'development test release' && bundle install)
###############################################################################
FROM docker.io/library/ruby:3.4.9-alpine3.23 AS final
LABEL org.label-schema.maintainer="betadots GmbH" \
org.label-schema.vendor="betadots GmbH" \
org.label-schema.url="https://github.com/betadots/hdm" \
org.label-schema.license="AGPLv3+" \
org.label-schema.vcs-url="https://github.com/betadots/hdm" \
org.label-schema.schema-version="1.0" \
org.label-schema.dockerfile="/Dockerfile" \
org.label-schema.name="HDM - Hiera Data Manager"
RUN apk update \
&& apk upgrade \
&& apk add --no-cache --update \
git \
sqlite \
tzdata \
libstdc++ \
bash
ENV APP_HOME=/hdm
ENV RAILS_ENV=production
ENV HDM_PORT=3000
ENV HDM_HOST=0.0.0.0
ENV RUBYOPT="--yjit"
EXPOSE $HDM_PORT
WORKDIR $APP_HOME
# copy only the needed files from the builder image
COPY --from=builder /usr/local/bundle /usr/local/bundle
COPY --from=builder $APP_HOME $APP_HOME
COPY Dockerfile /
COPY VERSION /
CMD ["sh", "-c", "/hdm/bin/entry.sh ${HDM_PORT} ${HDM_HOST}"]