Skip to content

Commit

Permalink
Merge pull request #3485 from dependabot/feelepxyz/cache-apt-composer
Browse files Browse the repository at this point in the history
Cache composer installs & install ca-certificates
  • Loading branch information
feelepxyz authored Apr 15, 2021
2 parents cb787bf + a54e867 commit 5f1d3a9
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ENV DEBIAN_FRONTEND="noninteractive" \
# Everything from `make` onwards in apt-get install is only installed to ensure
# Python support works with all packages (which may require specific libraries
# at install time).

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
Expand All @@ -19,6 +18,7 @@ RUN apt-get update \
bzr \
mercurial \
gnupg2 \
ca-certificates \
curl \
wget \
file \
Expand Down Expand Up @@ -48,7 +48,8 @@ RUN apt-get update \
libxmlsec1-dev \
libgeos-dev \
python3-enchant \
&& locale-gen en_US.UTF-8
&& locale-gen en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*

ARG USER_UID=1000
ARG USER_GID=$USER_UID
Expand All @@ -70,7 +71,8 @@ RUN apt-add-repository ppa:brightbox/ruby-ng \
&& gem update --system 3.2.14 \
&& gem install bundler -v 1.17.3 --no-document \
&& gem install bundler -v 2.2.15 --no-document \
&& rm -Rf /var/lib/gems/2.6.0/cache/*
&& rm -rf /var/lib/gems/2.6.0/cache/* \
&& rm -rf /var/lib/apt/lists/*


### PYTHON
Expand Down Expand Up @@ -145,7 +147,19 @@ RUN add-apt-repository ppa:ondrej/php \
php7.4-tidy \
php7.4-xml \
php7.4-zip \
php7.4-zmq
php7.4-zmq \
&& rm -rf /var/lib/apt/lists/*
USER dependabot
# Perform a fake `composer update` to warm ~/dependabot/.cache/composer/repo
# with historic data (we don't care about package files here)
RUN mkdir /tmp/composer-cache \
&& cd /tmp/composer-cache \
&& echo '{"require":{"psr/log": "^1.1.3"}}' > composer.json \
&& composer update --no-scripts --dry-run \
&& cd /tmp \
&& rm -rf /home/dependabot/.cache/composer/files \
&& rm -rf /tmp/composer-cache
USER root


### GO
Expand Down Expand Up @@ -181,7 +195,8 @@ RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& echo "$ELIXIR_CHECKSUM Precompiled.zip" | sha512sum -c - \
&& unzip -d /usr/local/elixir -x Precompiled.zip \
&& rm -f Precompiled.zip erlang-solutions_1.0_all.deb \
&& mix local.hex --force
&& mix local.hex --force \
&& rm -rf /var/lib/apt/lists/*


### RUST
Expand Down

0 comments on commit 5f1d3a9

Please sign in to comment.