From 8fb41bfec4baad93be69be9b962acfecd4e5c3a3 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 7 Oct 2023 21:00:47 +0300
Subject: [PATCH] Toolbx: Better cURL defaults.

---
 toolbx/.curlrc    |  6 ++++++
 toolbx/Dockerfile | 11 ++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
 create mode 100644 toolbx/.curlrc

diff --git a/toolbx/.curlrc b/toolbx/.curlrc
new file mode 100644
index 0000000..1f967b1
--- /dev/null
+++ b/toolbx/.curlrc
@@ -0,0 +1,6 @@
+--silent
+--location
+--fail
+--show-error
+--compressed
+--proto="=https"
diff --git a/toolbx/Dockerfile b/toolbx/Dockerfile
index b07db82..85c975c 100644
--- a/toolbx/Dockerfile
+++ b/toolbx/Dockerfile
@@ -5,6 +5,7 @@ FROM docker.io/debian:testing-backports
 COPY --from=golang /go/bin/host-spawn /usr/local/bin/host-spawn
 SHELL ["/bin/bash", "-o", "pipefail", "-xc"]
 ADD [ "https://www.shore.co.il/blog/static/runas", "/usr/local/sbin/runas" ]
+COPY --chown=root:root .curlrc /root/
 # hadolint ignore=DL3008
 RUN rm /etc/apt/apt.conf.d/docker-* && \
     apt-get update && \
@@ -22,15 +23,15 @@ RUN rm /etc/apt/apt.conf.d/docker-* && \
     && \
     export GNUPGHOME=/tmp/gnupghome && \
     mkdir --mode=0700 "$GNUPGHOME" && \
-    curl -fsSL https://dl.k8s.io/apt/doc/apt-key.gpg > \
+    curl https://dl.k8s.io/apt/doc/apt-key.gpg > \
     /usr/share/keyrings/google-cloud.gpg && \
-    curl -fsSL https://pgp.mongodb.com/server-5.0.asc | \
+    curl https://pgp.mongodb.com/server-5.0.asc | \
     gpg --no-default-keyring --import --batch --keyring /usr/share/keyrings/mongodb.gpg && \
-    curl -fsSL https://apt.releases.hashicorp.com/gpg | \
+    curl https://apt.releases.hashicorp.com/gpg | \
     gpg --no-default-keyring --import --batch --keyring /usr/share/keyrings/hashicorp.gpg && \
-    curl -fsSL https://dl.cloudsmith.io/public/cloudposse/packages/gpg.7333C6FDEFA717CC.key | \
+    curl https://dl.cloudsmith.io/public/cloudposse/packages/gpg.7333C6FDEFA717CC.key | \
     gpg --no-default-keyring --import --batch --keyring /usr/share/keyrings/cloudposse.gpg && \
-    curl -fsSL https://repo.charm.sh/apt/gpg.key | \
+    curl https://repo.charm.sh/apt/gpg.key | \
     gpg --no-default-keyring --import --batch --keyring /usr/share/keyrings/charm.gpg && \
     gpg --no-default-keyring --keyring /usr/share/keyrings/clickhouse.gpg --keyserver hkp://keyserver.ubuntu.com:80  --recv-keys 8919F6BD2B48D754 && \
     ln --symbolic --target /usr/local/bin/ /usr/libexec/flatpak-xdg-utils/* && \
-- 
GitLab