1
1
# This Dockerfile produces a production ready image of talos-manager.
2
2
3
3
ARG RUBY_VERSION=3.2.0
4
- FROM ruby:${RUBY_VERSION}-alpine as base
4
+ FROM ruby:${RUBY_VERSION}-slim as base
5
5
6
6
WORKDIR /app
7
7
@@ -18,9 +18,10 @@ RUN chmod +x /usr/local/bin/talosctl
18
18
FROM base as gems
19
19
20
20
# git for git based Gemfile definitions
21
- # build-base for native extensions
22
- # postgresql-dev for pg gem
23
- RUN apk add git build-base postgresql-dev
21
+ # build-essential + pkg-config for native extensions
22
+ # libpq-dev for pg gem
23
+ RUN apt-get update -qq && \
24
+ apt-get install --no-install-recommends -y build-essential pkg-config git libpq-dev
24
25
25
26
COPY .ruby-version .
26
27
COPY Gemfile* ./
@@ -31,14 +32,12 @@ RUN rm -rf vendor/bundle/ruby/*/cache
31
32
32
33
FROM base
33
34
34
- # libc6-compat required by nokogiri aarch64-linux
35
- # libpq required by pg
36
- # tzdata required by tzinfo
37
- # libcurl required by typhoeus
38
35
# wget for talosctl installation
39
- # curl is required for the heroku release command output
40
- # sqlite-libs required by sqlite3 (only used if DB_ADAPTER=sqlite)
41
- RUN apk add wget libc6-compat tzdata libcurl libpq curl sqlite-libs
36
+ # curl is required for typhoeus and the heroku release command output
37
+ # libsqlite3-0 for sqlite3
38
+ RUN apt-get update -qq && \
39
+ apt-get install --no-install-recommends -y wget curl libsqlite3-0 postgresql-client file && \
40
+ rm -rf /var/lib/apt/lists /var/cache/apt/archives
42
41
43
42
COPY --from=gems /app /app
44
43
COPY --from=talosctl /usr/local/bin/talosctl /usr/local/bin/talosctl
0 commit comments