Hello!
When using the provided Dockerfile.template, I am running into issues while building the image.
1. Missing curl
curl is not installed in the base image, so I added it to the apt-get install command.
2. Build error: gzip: stdin: unexpected end of file
After adding curl, the image build fails with the following error:
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Dockerfile (hidden in spoiler)
Click to expand Dockerfile
FROM debian:bullseye
RUN apt-get update && apt-get install -y --no-install-recommends dnsmasq wireless-tools curl
# use latest version. If specific version is required, it should be provided as vX.Y.Z, e.g v4.11.37
ARG VERSION="latest"
# create /usr/src/app/ui directory where we will extract pre-built UI
WORKDIR /usr/src/app/ui
WORKDIR /usr/src/app
RUN \
export BASE_URL="https://github.com/balena-os/wifi-connect/releases" &&\
DETECTED_ARCH=$(uname -m) &&\
case $DETECTED_ARCH in \
"aarch64") \
BINARY_ARCH_NAME="aarch64-unknown-linux-gnu" ;; \
"x86_64") \
BINARY_ARCH_NAME="x86_64-unknown-linux-gnu" ;;\
"armv7l") \
BINARY_ARCH_NAME="armv7-unknown-linux-gnueabihf" ;;\
*) \
echo >&2 "error: unsupported architecture ($DETECTED_ARCH)"; exit 1 ;; \
esac;\
if [ ${VERSION} = "latest" ]; then \
export URL_PARTIAL="latest/download" ; \
else \
export URL_PARTIAL="download/${VERSION}" ; \
fi; \
curl -Ls "$BASE_URL/$URL_PARTIAL/wifi-connect-$BINARY_ARCH_NAME.tar.gz" \
| tar -xvz -C /usr/src/app/ &&\
curl -Ls "$BASE_URL/$URL_PARTIAL/wifi-connect-ui.tar.gz" \
| tar -xvz -C /usr/src/app/ui
COPY scripts/start.sh .
CMD ["bash", "start.sh"]
Question
Does anyone know how to resolve this error?
It seems like the downloaded archive may be corrupted or unavailable for the detected architecture, but I am unsure how to fix it.
Best regards,
Matthias
Hello!
When using the provided
Dockerfile.template, I am running into issues while building the image.1. Missing
curlcurlis not installed in the base image, so I added it to theapt-get installcommand.2. Build error:
gzip: stdin: unexpected end of fileAfter adding
curl, the image build fails with the following error:Dockerfile (hidden in spoiler)
Click to expand Dockerfile
Question
Does anyone know how to resolve this error?
It seems like the downloaded archive may be corrupted or unavailable for the detected architecture, but I am unsure how to fix it.
Best regards,
Matthias