VOL-1763 - correct Dockerfile lint issues, and add docker lint to Makefile
Change-Id: I5f9ed6774e8da10b1bfa5a6b817649bbe5c8951a
diff --git a/docker/Dockerfile.simulated_onu b/docker/Dockerfile.simulated_onu
index 911bd4d..3c66d33 100644
--- a/docker/Dockerfile.simulated_onu
+++ b/docker/Dockerfile.simulated_onu
@@ -18,13 +18,19 @@
FROM golang:1.12-alpine3.9 AS build-env
# Install required packages
-RUN apk add --no-cache wget git make build-base protobuf protobuf-dev
+RUN apk add --no-cache \
+ wget=1.20.3-r0 \
+ git=2.20.1-r0 \
+ make=4.2.1-r2 \
+ build-base=0.5-r1 \
+ protobuf=3.6.1-r1 \
+ protobuf-dev=3.6.1-r1
# Prepare directory structure
-RUN ["mkdir", "-p", "/build"]
-RUN ["mkdir", "-p", "$GOPATH/src", "$GOPATH/pkg", "$GOPATH/bin"]
-RUN ["mkdir", "-p", "$GOPATH/src/github.com/opencord"]
-RUN ["mkdir", "-p", "$GOPATH/src/github.com/opencord/voltha-go"]
+RUN mkdir -p /build \
+ "$GOPATH/src/" "$GOPATH/pkg" "$GOPATH/bin" \
+ "$GOPATH/src/github.com/opencord" \
+ "$GOPATH/src/github.com/opencord/voltha-go"
WORKDIR $GOPATH/src/github.com/opencord/voltha-go
@@ -47,7 +53,9 @@
ARG org_opencord_vcs_dirty=unknown
# Build
-RUN cd adapters/simulated_onu && go build -o /build/simulated_onu \
+WORKDIR $GOPATH/src/github.com/opencord/voltha-go/adapters/simulated_onu
+SHELL ["/bin/ash", "-o", "pipefail", "-c"]
+RUN go build -o /build/simulated_onu \
-ldflags \
"-X github.com/opencord/voltha-go/common/version.version=$org_label_schema_version \
-X github.com/opencord/voltha-go/common/version.vcsRef=$org_label_schema_vcs_ref \