Move ARGs to prevent invalidating docker caches
Having the ARG at the top of the dockerfiles
cause all the cached layers below to be invalidated
resulting in needlessly re-downloading or re-copying
files
Change-Id: Ie701b1556ee21ecdcf629e06c9b26d80af0fb344
diff --git a/docker/Dockerfile.simulated_olt b/docker/Dockerfile.simulated_olt
index 6904318..2cf9ba2 100644
--- a/docker/Dockerfile.simulated_olt
+++ b/docker/Dockerfile.simulated_olt
@@ -17,13 +17,6 @@
FROM golang:1.12-alpine3.9 AS build-env
-ARG org_label_schema_version=unknown
-ARG org_label_schema_vcs_url=unknown
-ARG org_label_schema_vcs_ref=unknown
-ARG org_label_schema_build_date=unknown
-ARG org_opencord_vcs_commit_date=unknown
-ARG org_opencord_vcs_dirty=unknown
-
# Install required packages
RUN apk add --no-cache wget git make build-base protobuf protobuf-dev
@@ -46,6 +39,13 @@
COPY adapters/common ./adapters/common
COPY adapters/*.go ./adapters/
+ARG org_label_schema_version=unknown
+ARG org_label_schema_vcs_url=unknown
+ARG org_label_schema_vcs_ref=unknown
+ARG org_label_schema_build_date=unknown
+ARG org_opencord_vcs_commit_date=unknown
+ARG org_opencord_vcs_dirty=unknown
+
# Build
RUN cd adapters/simulated_olt && go build -o /build/simulated_olt \
-ldflags \