Skip to content

Commit 5fc63d5

Browse files
committed
Use slim docker image to fix sqlite3 issue
sqlite3 gem version 2.x fixes this but 1.x is required by Rails. Reference: sparklemotion/sqlite3-ruby#434
1 parent de35603 commit 5fc63d5

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Dockerfile

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This Dockerfile produces a production ready image of talos-manager.
22

33
ARG RUBY_VERSION=3.2.0
4-
FROM ruby:${RUBY_VERSION}-alpine as base
4+
FROM ruby:${RUBY_VERSION}-slim as base
55

66
WORKDIR /app
77

@@ -18,9 +18,10 @@ RUN chmod +x /usr/local/bin/talosctl
1818
FROM base as gems
1919

2020
# 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
2425

2526
COPY .ruby-version .
2627
COPY Gemfile* ./
@@ -31,14 +32,12 @@ RUN rm -rf vendor/bundle/ruby/*/cache
3132

3233
FROM base
3334

34-
# libc6-compat required by nokogiri aarch64-linux
35-
# libpq required by pg
36-
# tzdata required by tzinfo
37-
# libcurl required by typhoeus
3835
# 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
4241

4342
COPY --from=gems /app /app
4443
COPY --from=talosctl /usr/local/bin/talosctl /usr/local/bin/talosctl

0 commit comments

Comments
 (0)