-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
57 lines (45 loc) · 1.54 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
FROM docker.io/library/ruby:3.3.6-slim-bookworm AS build
RUN apt update && apt install -y \
ffmpeg \
g++ \
gcc \
imagemagick \
libc-dev \
libffi-dev \
libgcrypt-dev \
libmariadb-dev \
libstdc++-12-dev \
libxml2-dev \
libxslt-dev \
make \
tzdata \
xz-utils
COPY Gemfile /
COPY Gemfile.lock /
RUN bundle config set path.system true \
&& bundle config set jobs $(nproc) \
&& bundle config set without 'development test' \
&& bundle install --gemfile=/Gemfile
###############################################################################
FROM docker.io/library/ruby:3.3.6-slim-bookworm AS final
LABEL org.label-schema.maintainer="bronko.media" \
org.label-schema.vendor="bronko.media" \
org.label-schema.url="https://github.com/bronko-media/bronko.media.server" \
org.label-schema.name="bronko.media.server" \
org.label-schema.license="BSD-3-Clause" \
org.label-schema.vcs-url="https://github.com/bronko-media/bronko.media.server" \
org.label-schema.schema-version="1.0" \
org.label-schema.dockerfile="/Dockerfile"
RUN apt update && apt upgrade -y \
&& apt install -y ffmpeg imagemagick tzdata xz-utils libmariadb3 \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/local/lib/ruby/gems/*/cache/*
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY Dockerfile /
ENV RACK_ENV=production
ENV APP_HOME=/bronko.media
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
ADD . $APP_HOME
EXPOSE 4567
ENTRYPOINT ["/bronko.media/entry.sh"]