mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Revert "Attempt to speed up production builds by skipping apt update (#144)"
This reverts commit 65b61dc241.
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -15,14 +15,16 @@ FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
|
||||
WORKDIR /rails
|
||||
|
||||
# Install base packages
|
||||
RUN apt-get install --no-install-recommends -y \
|
||||
RUN apt-get update -qq && \
|
||||
apt-get install --no-install-recommends -y \
|
||||
curl \
|
||||
libjemalloc2 \
|
||||
libvips \
|
||||
sqlite3 \
|
||||
libpq5 \
|
||||
vim \
|
||||
wget
|
||||
wget && \
|
||||
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||
|
||||
# Set production environment
|
||||
ENV RAILS_ENV="production" \
|
||||
@@ -33,12 +35,10 @@ ENV RAILS_ENV="production" \
|
||||
# Throw-away build stage to reduce size of final image
|
||||
FROM base AS build
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get install --no-install-recommends -y \
|
||||
build-essential \
|
||||
git \
|
||||
pkg-config \
|
||||
libpq-dev
|
||||
# Install packages needed to build gems
|
||||
RUN apt-get update -qq && \
|
||||
apt-get install --no-install-recommends -y build-essential git pkg-config libpq-dev && \
|
||||
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||
|
||||
# Install application gems
|
||||
COPY Gemfile Gemfile.lock ./
|
||||
|
||||
Reference in New Issue
Block a user