Unify curl options
Currently we use couple of curl options throughout Dockerfiles, this change adds all common options to curlrc (-sSLf) and removes usage of those in Dockerfiles. Change-Id: I46b77978926fc2b578a68d1aaa944b2198af0685
This commit is contained in:
parent
e0835803d7
commit
22c32a30e6
@ -393,7 +393,7 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom
|
||||
{% endif -%}
|
||||
{% endfor %}
|
||||
{% for key in remote_apt_keys | customizable('remote_apt_keys') %}
|
||||
{%- if loop.first %} RUN {% else %} && {% endif %}curl -L {{ key }} | apt-key add -
|
||||
{%- if loop.first %} RUN {% else %} && {% endif %}curl {{ key }} | apt-key add -
|
||||
{%- if not loop.last %} \
|
||||
{% endif -%}
|
||||
{% endfor %}
|
||||
@ -427,7 +427,7 @@ COPY curlrc /root/.curlrc
|
||||
|
||||
{% block dumb_init_installation %}
|
||||
|
||||
RUN curl -sSL https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_{{debian_arch}} -o /usr/local/bin/dumb-init \
|
||||
RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_{{debian_arch}} -o /usr/local/bin/dumb-init \
|
||||
&& chmod +x /usr/local/bin/dumb-init
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,4 +1,6 @@
|
||||
# curl default options
|
||||
--fail
|
||||
--location
|
||||
--silent
|
||||
--show-error
|
||||
--write-out "curl (%{url_effective}): response: %{http_code}, time: %{time_total}, size: %{size_download}\n"
|
||||
|
@ -107,7 +107,7 @@ RUN ln -s /bin/mkdir /usr/bin/mkdir
|
||||
ARG monasca_output_plugin_tag=1.0.1
|
||||
ARG monasca_output_plugin_url=https://github.com/monasca/fluentd-monasca/archive/$monasca_output_plugin_tag.tar.gz
|
||||
|
||||
RUN curl -sSL $monasca_output_plugin_url -o /tmp/fluentd-monasca.tar.gz \
|
||||
RUN curl $monasca_output_plugin_url -o /tmp/fluentd-monasca.tar.gz \
|
||||
&& tar -xvf /tmp/fluentd-monasca.tar.gz -C /tmp \
|
||||
&& cd /tmp/fluentd-monasca-* \
|
||||
{%- if fluentd_user == 'fluentd' %}
|
||||
|
@ -36,7 +36,7 @@ ENV kafka_pkg_sha512sum=9773a85ef2898b4bae20481df4cfd5488bd195fffd700fcc874a9fa5
|
||||
{% endblock %}
|
||||
|
||||
{% block kafka_install %}
|
||||
RUN curl -sSL -o /tmp/kafka.tgz ${kafka_url} \
|
||||
RUN curl -o /tmp/kafka.tgz ${kafka_url} \
|
||||
&& echo "${kafka_pkg_sha512sum} /tmp/kafka.tgz" | sha512sum -c \
|
||||
&& tar --strip 1 -xvf /tmp/kafka.tgz -C /opt/kafka \
|
||||
&& rm -f /tmp/kafka.tgz
|
||||
|
@ -61,7 +61,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
] %}
|
||||
|
||||
RUN mkdir -p /requirements \
|
||||
&& curl -sSL -o /requirements/upper-constraints.txt https://releases.openstack.org/constraints/upper/{{ openstack_release }} \
|
||||
&& curl -o /requirements/upper-constraints.txt https://releases.openstack.org/constraints/upper/{{ openstack_release }} \
|
||||
&& {{ macros.install_pip(kolla_toolbox_pip_virtualenv_packages | customizable("pip_virtualenv_packages")) }} \
|
||||
&& virtualenv --system-site-packages {{ virtualenv_path }}
|
||||
|
||||
|
@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
{{ macros.install_packages(mariadb_clustercheck_packages | customizable("packages")) }}
|
||||
|
||||
{% if base_package_type == 'deb' %}
|
||||
RUN curl -sSL -o /usr/bin/clustercheck https://src.fedoraproject.org/rpms/mariadb/raw/10.3/f/clustercheck.sh \
|
||||
RUN curl -o /usr/bin/clustercheck https://src.fedoraproject.org/rpms/mariadb/raw/10.3/f/clustercheck.sh \
|
||||
&& chmod 755 /usr/bin/clustercheck
|
||||
{% endif %}
|
||||
|
||||
|
@ -56,7 +56,7 @@ ARG monasca_grafana_app_url=https://github.com/monasca/monasca-grafana/archive/$
|
||||
# NPM installs itself in /usr/local/bin (the default in Ubuntu) which is not in the PATH.
|
||||
# This is forced for all distros to avoid conflicts with native packages.
|
||||
RUN gem install fpm \
|
||||
&& curl -sSL -o /tmp/monasca-grafana.tgz ${monasca_grafana_url} \
|
||||
&& curl -o /tmp/monasca-grafana.tgz ${monasca_grafana_url} \
|
||||
&& mkdir -p ${monasca_grafana_build_path} \
|
||||
&& tar --strip 1 -xvf /tmp/monasca-grafana.tgz -C ${monasca_grafana_build_path} \
|
||||
&& rm -f /tmp/monasca-grafana.tgz \
|
||||
@ -87,7 +87,7 @@ RUN grafana-cli plugins install monasca-datasource \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN mkdir -p /var/lib/grafana/plugins/monasca-grafana \
|
||||
&& curl -Lo tmp.tgz ${monasca_grafana_app_url} \
|
||||
&& curl -o tmp.tgz ${monasca_grafana_app_url} \
|
||||
&& tar zxvf tmp.tgz -C /var/lib/grafana/plugins/monasca-grafana --strip-components=1 \
|
||||
&& rm tmp.tgz \
|
||||
&& npm install -g grunt \
|
||||
|
@ -10,7 +10,7 @@ ENV prometheus_alertmanager_version=0.20.0
|
||||
{% endblock %}
|
||||
|
||||
{% block prometheus_alertmanager_install %}
|
||||
RUN curl -sSL -o /tmp/prometheus_alertmanager.tar.gz https://github.com/prometheus/alertmanager/releases/download/v${prometheus_alertmanager_version}/alertmanager-${prometheus_alertmanager_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/prometheus_alertmanager.tar.gz https://github.com/prometheus/alertmanager/releases/download/v${prometheus_alertmanager_version}/alertmanager-${prometheus_alertmanager_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/prometheus_alertmanager.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/prometheus_alertmanager.tar.gz \
|
||||
&& ln -s /opt/alertmanager* /opt/prometheus_alertmanager
|
||||
|
@ -24,7 +24,7 @@ ENV blackbox_exporter_version=0.16.0
|
||||
{{ macros.install_packages(blackbox_packages | customizable("packages")) }}
|
||||
|
||||
{% block prometheus_blackbox_exporter_install %}
|
||||
RUN curl -sSL -o /tmp/blackbox_exporter.tar.gz https://github.com/prometheus/blackbox_exporter/releases/download/v${blackbox_exporter_version}/blackbox_exporter-${blackbox_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/blackbox_exporter.tar.gz https://github.com/prometheus/blackbox_exporter/releases/download/v${blackbox_exporter_version}/blackbox_exporter-${blackbox_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/blackbox_exporter.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/blackbox_exporter.tar.gz \
|
||||
&& ln -s /opt/blackbox_exporter* /opt/blackbox_exporter
|
||||
|
@ -14,7 +14,7 @@ ENV prometheus_cadvisor_version=0.35.0
|
||||
{% if base_arch in ['x86_64'] %}
|
||||
|
||||
{% block prometheus_cadvisor_install %}
|
||||
RUN curl -ssL -o /opt/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor && chmod 0755 /opt/cadvisor
|
||||
RUN curl -o /opt/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor && chmod 0755 /opt/cadvisor
|
||||
{% endblock %}
|
||||
|
||||
{% else %}
|
||||
|
@ -10,7 +10,7 @@ ENV elasticsearch_exporter_version=1.1.0
|
||||
{% endblock %}
|
||||
|
||||
{% block prometheus_elasticsearch_exporter_install %}
|
||||
RUN curl -sSL -o /tmp/elasticsearch_exporter.tar.gz https://github.com/justwatchcom/elasticsearch_exporter/releases/download/v${elasticsearch_exporter_version}/elasticsearch_exporter-${elasticsearch_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/elasticsearch_exporter.tar.gz https://github.com/justwatchcom/elasticsearch_exporter/releases/download/v${elasticsearch_exporter_version}/elasticsearch_exporter-${elasticsearch_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/elasticsearch_exporter.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/elasticsearch_exporter.tar.gz \
|
||||
&& ln -s /opt/elasticsearch_exporter* /opt/elasticsearch_exporter
|
||||
|
@ -10,7 +10,7 @@ ENV haproxy_exporter_version=0.10.0
|
||||
{% endblock %}
|
||||
|
||||
{% block haproxy_exporter_install %}
|
||||
RUN curl -sSL -o /tmp/haproxy_exporter.tar.gz https://github.com/prometheus/haproxy_exporter/releases/download/v${haproxy_exporter_version}/haproxy_exporter-${haproxy_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/haproxy_exporter.tar.gz https://github.com/prometheus/haproxy_exporter/releases/download/v${haproxy_exporter_version}/haproxy_exporter-${haproxy_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/haproxy_exporter.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/haproxy_exporter.tar.gz \
|
||||
&& ln -s /opt/haproxy_exporter* /opt/haproxy_exporter
|
||||
|
@ -10,7 +10,7 @@ ENV memcached_exporter_version=0.6.0
|
||||
{% endblock %}
|
||||
|
||||
{% block prometheus_memcached_exporter_install %}
|
||||
RUN curl -sSL -o /tmp/memcached_exporter.tar.gz https://github.com/prometheus/memcached_exporter/releases/download/v${memcached_exporter_version}/memcached_exporter-${memcached_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/memcached_exporter.tar.gz https://github.com/prometheus/memcached_exporter/releases/download/v${memcached_exporter_version}/memcached_exporter-${memcached_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/memcached_exporter.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/memcached_exporter.tar.gz \
|
||||
&& ln -s /opt/memcached_exporter* /opt/memcached_exporter
|
||||
|
@ -18,7 +18,7 @@ ARG prometheus_mtail_url=https://github.com/google/mtail/releases/download/${pro
|
||||
{% endblock %}
|
||||
|
||||
{% block prometheus_mtail_install %}
|
||||
RUN curl -sSL -o /opt/mtail ${prometheus_mtail_url} \
|
||||
RUN curl -o /opt/mtail ${prometheus_mtail_url} \
|
||||
&& chmod +x /opt/mtail
|
||||
{% endblock %}
|
||||
|
||||
|
@ -10,7 +10,7 @@ ENV mysqld_exporter_version=0.12.1
|
||||
{% endblock %}
|
||||
|
||||
{% block mysqld_exporter_install %}
|
||||
RUN curl -ssL -o /tmp/mysqld_exporter.tar.gz https://github.com/prometheus/mysqld_exporter/releases/download/v${mysqld_exporter_version}/mysqld_exporter-${mysqld_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/mysqld_exporter.tar.gz https://github.com/prometheus/mysqld_exporter/releases/download/v${mysqld_exporter_version}/mysqld_exporter-${mysqld_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/mysqld_exporter.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/mysqld_exporter.tar.gz \
|
||||
&& ln -s /opt/mysqld_exporter* /opt/mysqld_exporter
|
||||
|
@ -10,7 +10,7 @@ ENV node_exporter_version=0.18.1
|
||||
{% endblock %}
|
||||
|
||||
{% block node_exporter_install %}
|
||||
RUN curl -sSL -o /tmp/node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v${node_exporter_version}/node_exporter-${node_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v${node_exporter_version}/node_exporter-${node_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/node_exporter.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/node_exporter.tar.gz \
|
||||
&& ln -s /opt/node_exporter* /opt/node_exporter
|
||||
|
@ -10,7 +10,7 @@ ENV prometheus_openstack_exporter_version=1.2.0
|
||||
{% endblock %}
|
||||
|
||||
{% block prometheus_openstack_exporter_install %}
|
||||
RUN curl -sSL -o /tmp/prometheus_openstack_exporter.tar.gz https://github.com/openstack-exporter/openstack-exporter/releases/download/v${prometheus_openstack_exporter_version}/openstack-exporter-${prometheus_openstack_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/prometheus_openstack_exporter.tar.gz https://github.com/openstack-exporter/openstack-exporter/releases/download/v${prometheus_openstack_exporter_version}/openstack-exporter-${prometheus_openstack_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/prometheus_openstack_exporter.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/prometheus_openstack_exporter.tar.gz \
|
||||
&& ln -s /opt/openstack-exporter* /opt/openstack-exporter
|
||||
|
@ -10,7 +10,7 @@ ENV prometheus_version=1.8.2
|
||||
{% endblock %}
|
||||
|
||||
{% block prometheus_server_install %}
|
||||
RUN curl -sSL -o /tmp/prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v${prometheus_version}/prometheus-${prometheus_version}.linux-{{debian_arch}}.tar.gz \
|
||||
RUN curl -o /tmp/prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v${prometheus_version}/prometheus-${prometheus_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/prometheus.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/prometheus.tar.gz \
|
||||
&& ln -s /opt/prometheus* /opt/prometheus \
|
||||
|
@ -15,7 +15,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
RUN echo 'image on {{ base_distro }} is not yet available on non x86_64 platforms' \
|
||||
&& /bin/false
|
||||
{% else %}
|
||||
RUN curl -o /usr/bin/skydive -L "https://github.com/skydive-project/skydive/releases/download/v0.26.0/skydive" \
|
||||
RUN curl -o /usr/bin/skydive "https://github.com/skydive-project/skydive/releases/download/v0.26.0/skydive" \
|
||||
&& chmod +x /usr/bin/skydive
|
||||
{% endif %}
|
||||
|
||||
|
@ -35,7 +35,7 @@ ENV storm_pkg_sha512sum=0a1120b8df7b22edc75f0a412d625841f72f3fb8e9ff5d413d510908
|
||||
{% endblock %}
|
||||
|
||||
{% block storm_install %}
|
||||
RUN curl -sSL -o /tmp/storm.tgz ${storm_url} \
|
||||
RUN curl -o /tmp/storm.tgz ${storm_url} \
|
||||
&& echo "${storm_pkg_sha512sum} /tmp/storm.tgz" | sha512sum -c \
|
||||
&& tar --strip 1 -xvf /tmp/storm.tgz -C /opt/storm \
|
||||
&& rm -f /tmp/storm.tgz
|
||||
|
@ -28,7 +28,7 @@ ENV zookeeper_pkg_sha1sum=a989b527f3f990d471e6d47ee410e57d8be7620b
|
||||
{% endblock %}
|
||||
|
||||
{% block zookeeper_binary_install %}
|
||||
RUN curl -sSL -o /tmp/zookeeper.tar.gz ${zookeeper_url} \
|
||||
RUN curl -o /tmp/zookeeper.tar.gz ${zookeeper_url} \
|
||||
&& echo "${zookeeper_pkg_sha1sum} /tmp/zookeeper.tar.gz" | sha1sum -c \
|
||||
&& tar --strip 1 -xvf /tmp/zookeeper.tar.gz -C /opt/zookeeper \
|
||||
&& rm -f /tmp/zookeeper.tar.gz
|
||||
|
@ -36,7 +36,7 @@ COPY zun_sudoers /etc/sudoers.d/kolla_zun_sudoers
|
||||
RUN chmod 750 /etc/sudoers.d \
|
||||
&& chmod 640 /etc/sudoers.d/kolla_zun_sudoers
|
||||
|
||||
RUN curl -sSL -o /tmp/cni-plugins-v0.7.1.tgz https://github.com/containernetworking/plugins/releases/download/v0.7.1/cni-plugins-amd64-v0.7.1.tgz \
|
||||
RUN curl -o /tmp/cni-plugins-v0.7.1.tgz https://github.com/containernetworking/plugins/releases/download/v0.7.1/cni-plugins-amd64-v0.7.1.tgz \
|
||||
&& tar -C /opt -xzvf /tmp/cni-plugins-v0.7.1.tgz ./loopback \
|
||||
&& rm -f /tmp/cni-plugins-v0.7.1.tgz
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user