Fix the Polyverse reinstall that caused APK broken state (#5751)
* Fix py2-psycopg2 right after upgrade This mitigates the issue https://github.com/netdata/netdata/issues/5588 * Improve reinstall script so it doesn't get into broken state * Update and upgrade before polymorphic linux * apk fix py2-psycopg2 right after reinstall. * Removing apk fix - package is now blacklisted upstream
Archis committed
Apr 1, 2019 at 09:21 UTC
061643fb41c5d5ae6daa74251074cdfae6ecd88f
1 file changed
+6
-4
packaging/docker/Dockerfile
+6
-4
@@ -39,11 +39,13 @@ FROM netdata/base:${ARCH}
39
40
# Conditional subscribiton to Polyverse's Polymorphic Linux repositories
41
RUN if [ "$(uname -m)" == "x86_64" ]; then \
42
+ apk update && apk upgrade; \
43
curl https://sh.polyverse.io | sh -s install gcxce5byVQbtRz0iwfGkozZwy support+netdata@polyverse.io; \
43
- apk update; \
44
- apk upgrade --available --no-cache; \
45
- sed -in 's/^#//g' /etc/apk/repositories; \
46
- apk fix py2-psycopg2; \
44
+ if [ $? -eq 0 ]; then \
45
+ apk update && \
46
+ apk upgrade --available --no-cache && \
47
+ sed -in 's/^#//g' /etc/apk/repositories; \
48
+ fi \
49
fi
50
51
# Copy files over