From 2ab495897dc023973db61b76b7ef0fb62c4cc3b5 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Wed, 22 Jan 2025 16:57:54 +0800 Subject: [PATCH] chore: update Dockerfile to install libpq5 - Add libpq5 to the list of installed packages for database connections. - Remove libpq-dev from the list as it is no longer necessary for the build process. These adjustments enhance the Docker image configuration, ensuring the application can connect to PostgreSQL databases without unnecessary build dependencies. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e40dbe4..73d9e6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ WORKDIR /rails # Install base packages RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y curl libjemalloc2 libvips sqlite3 && \ + apt-get install --no-install-recommends -y curl libjemalloc2 libvips sqlite3 libpq5 && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives # Set production environment @@ -30,7 +30,7 @@ FROM base AS build # Install packages needed to build gems and node modules RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y build-essential git node-gyp pkg-config python-is-python3 libpq-dev && \ + apt-get install --no-install-recommends -y build-essential git node-gyp pkg-config python-is-python3 && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives # Install JavaScript dependencies