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
@@ -11,16 +11,20 @@ ENV BUNDLE_CLEAN=true
11
11
12
12
FROM base as talosctl
13
13
14
+ RUN apt-get update -qq && apt-get install --no-install-recommends -y wget
15
+
14
16
ARG TALOS_VERSION=1.7.4
17
+ # TODO: This should use TARGETPLATFORM to determine the correct binary to download
15
18
RUN wget https://github.com/siderolabs/talos/releases/download/v${TALOS_VERSION}/talosctl-linux-amd64 -O /usr/local/bin/talosctl
16
19
RUN chmod +x /usr/local/bin/talosctl
17
20
18
21
FROM base as gems
19
22
20
23
# 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
24
+ # build-essential + pkg-config for native extensions
25
+ # libpq-dev for pg gem
26
+ RUN apt-get update -qq && \
27
+ apt-get install --no-install-recommends -y build-essential pkg-config git libpq-dev
24
28
25
29
COPY .ruby-version .
26
30
COPY Gemfile* ./
@@ -31,14 +35,12 @@ RUN rm -rf vendor/bundle/ruby/*/cache
31
35
32
36
FROM base
33
37
34
- # libc6-compat required by nokogiri aarch64-linux
35
- # libpq required by pg
36
- # tzdata required by tzinfo
37
- # libcurl required by typhoeus
38
38
# 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
39
+ # curl is required for typhoeus and the heroku release command output
40
+ # libsqlite3-0 for sqlite3
41
+ RUN apt-get update -qq && \
42
+ apt-get install --no-install-recommends -y wget curl libsqlite3-0 postgresql-client file && \
43
+ rm -rf /var/lib/apt/lists /var/cache/apt/archives
42
44
43
45
COPY --from=gems /app /app
44
46
COPY --from=talosctl /usr/local/bin/talosctl /usr/local/bin/talosctl
0 commit comments