ARG BUILD_FROM
FROM $BUILD_FROM

# Copy root filesystem
COPY rootfs /

# Install vhclient
ARG VHCLIENT_BASE_URL=https://www.virtualhere.com/sites/default/files/usbclient
#ARG VHCLIENT
RUN \
if [ "${BUILD_ARCH}" = "armhf" ]; then \
  set VHCLIENT="vhclientarmhf"; \
elif [ "${BUILD_ARCH}" = "aarch64" ]; then \
  set VHCLIENT="vhclientarm64"; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then \
  set VHCLIENT="vhclientx86_64"; \
elif [ "${BUILD_ARCH}" = "i386" ]; then \
  set VHCLIENT="vhclienti386"; \
else \
  echo "No vhclient exists for build arch"; \
  exit 1; \
fi \
echo ${VHCLIENT} \
#curl -sSLf -o /usr/bin/vhclient $VHCLIENT_BASE_URL/$VHCLIENT
RUN chmod a+x /usr/bin/vhclient
