From 993ed42c321f71b6a39a9e9411c6b2cb72875fa2 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 17 Jul 2020 23:33:24 +0300
Subject: [PATCH] Rework the Dockerfile a bit.

Copy the archive using ADD. Untar during the build RUN command.
---
 Dockerfile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 0bdd729..b80fd51 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,13 +15,11 @@ RUN apk add --update --no-cache \
     ;
 ARG Version
 ENV VERSION="$Version"
-# Tar fails without an error in Docker Hub but succeeds on my laptop. For now
-# ignore the error as the build is fine even with it.
-RUN wget "https://github.com/varnish/hitch/archive/${VERSION}.tar.gz" && \
-    tar -vxzf "${VERSION}.tar.gz" || true
-WORKDIR /hitch-${Version}
+ADD "https://github.com/varnish/hitch/archive/${VERSION}.tar.gz" /
 ENV LDFLAGS="--static"
-RUN ./bootstrap && \
+RUN tar -xzf "${VERSION}.tar.gz" && \
+    cd "hitch-${VERSION}" && \
+    ./bootstrap && \
     ./configure && \
     make && \
     make install
-- 
GitLab