I am trying to build Graylog for ARM architectures using github.com/graylog2/graylog-docker
.
After starting the build using docker build --build-arg GRAYLOG_VERSION=3.0 -t graylog .
the build step fails because https://packages.graylog2.org/releases/graylog/graylog-${GRAYLOG_VERSION}.tgz.sha256.txt
does not seem to exist. Am I formatting the value for GRAYLOG_VERSION incorrectly?
Here is the full Docker build output:
Sending build context to Docker daemon 57.86kB
Step 1/32 : FROM debian:stretch-slim as graylog-downloader
---> c08899734c03
Step 2/32 : ARG VCS_REF
---> Using cache
---> 4c64b87c4572
Step 3/32 : ARG GRAYLOG_VERSION
---> Using cache
---> 098f5754b73a
Step 4/32 : WORKDIR /tmp
---> Using cache
---> f5a600c24dbf
Step 5/32 : RUN apt-get update > /dev/null && apt-get install --assume-yes ca-certificates curl > /dev/null
---> Using cache
---> 71957691d655
Step 6/32 : RUN curl --silent --location --retry 3 --output "/tmp/graylog-${GRAYLOG_VERSION}.tgz" "https://packages.graylog2.org/releases/graylog/graylog-${GRAYLOG_VERSION}.tgz"
---> Using cache
---> bb42f2b1abd0
Step 7/32 : RUN curl --silent --location --retry 3 --output "/tmp/graylog-${GRAYLOG_VERSION}.tgz.sha256.txt" "https://packages.graylog2.org/releases/graylog/graylog-${GRAYLOG_VERSION}.tgz.sha256.txt"
---> Using cache
---> 48af7de5cd18
Step 8/32 : RUN sha256sum --check "graylog-${GRAYLOG_VERSION}.tgz.sha256.txt"
---> Running in 1fd40711e147
sha256sum: graylog-3.0.tgz.sha256.txt: no properly formatted SHA256 checksum lines found
The command '/bin/sh -c sha256sum --check "graylog-${GRAYLOG_VERSION}.tgz.sha256.txt"' returned a non-zero code: 1
I also tried this on a device with an amd64 architecture. I think this has to do with the URL not existing or me not having proper permissions
EDIT
After fiddling with this more, it seems that hitting https://packages.graylog2.org/releases/graylog/graylog-3.0.tgz.sha256.txt
returns the following XML which causes the checksum to fail:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>graylog/graylog-3.0.tgz.sha256.txt</Key>
<RequestId>ACC6E994E8D57222</RequestId>
<HostId>O/0N8osrfMl66Ns3Qj4ATCIqZD9WKm28zGim8myIj2tbxOllmzYH50quXbPump8q3Cu3EPQdL0E=</HostId>
</Error>
EDIT 2
I seem to have fixed this issue by editing the URLs Dockerfile to point to downloads.graylog.org
rather than packages.graylog2.org
. I will consider making a PR in the docker repo