Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:bullseye

RUN apt-get update && apt-get install -y --no-install-recommends dnsmasq wireless-tools
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates 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"
Expand All @@ -14,23 +14,23 @@ 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 ;; \
"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" ; \
export URL_PARTIAL="latest/download" ; \
else \
export URL_PARTIAL="download/${VERSION}" ; \
export URL_PARTIAL="download/${VERSION}" ; \
fi; \
curl -Ls "$BASE_URL/$URL_PARTIAL/wifi-connect-$BINARY_ARCH_NAME.tar.gz" \
curl -fLs "$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" \
curl -fLs "$BASE_URL/$URL_PARTIAL/wifi-connect-ui.tar.gz" \
| tar -xvz -C /usr/src/app/ui

COPY scripts/start.sh .
Expand Down