Skip to content

Commit 61874c2

Browse files
Fix Heroku and Yarn install
It should: * stop building images that break a few months after the image has been built because Yarn GPG key has been rotated and is now invalid * fix Heroku CLI installation (the APT repository seems to provide a Zstd-compressed .deb file, which is not compatible with many APT versions)
1 parent 30224c3 commit 61874c2

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ RUN set -eux; \
8181
;; \
8282
esac; \
8383
\
84-
# Add PostgreSQL APT reposiroty
84+
# Add PostgreSQL APT repository
8585
curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg; \
8686
case ${debianReleaseCodename} in \
8787
jessie) echo "deb https://apt-archive.postgresql.org/pub/repos/apt ${debianReleaseCodename}-pgdg-archive main" ;; \
@@ -95,28 +95,24 @@ RUN set -eux; \
9595
*) echo "deb https://deb.nodesource.com/node_${NODE_VERSION}.x ${debianReleaseCodename} main" ;; \
9696
esac > /etc/apt/sources.list.d/nodesource.list; \
9797
\
98-
# Add Yarn APT repository
99-
curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.yarnpkg.com.gpg; \
100-
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list; \
101-
\
102-
# Add Heroku APT repository
103-
curl -sSL https://cli-assets.heroku.com/apt/release.key | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.heroku.com.gpg; \
104-
echo "deb https://cli-assets.heroku.com/branches/stable/apt ./" > /etc/apt/sources.list.d/heroku.list; \
105-
\
10698
# Install everything
10799
apt-get update; \
108100
apt-get install --assume-yes --no-install-recommends --no-install-suggests \
109-
heroku \
110101
jq \
111102
nano \
112103
nodejs \
113104
postgresql-client \
114105
vim \
115-
yarn \
116106
; \
117107
\
118108
# Cleanup
119109
rm -rf /var/lib/apt/lists/*; \
110+
\
111+
# Install Yarn (via NPM)
112+
npm install --global yarn; \
113+
\
114+
# Install Heroku CLI (standalone tarball)
115+
curl -sSL curl https://cli-assets.heroku.com/install.sh | sh; \
120116
;; \
121117
esac;
122118

0 commit comments

Comments
 (0)