Ensure not more then one 'ENTRYPOINT' in dockerfile

An 'ENTRYPOINT' allows you to configure a container that will run as an executable. Only the last 'ENTRYPOINT' instruction in the Dockerfile will have an effect.

Risk Level: high
Platform: Docker
Spectral Rule ID: DOCKR032


In dockerfile should be none or one ENTRYPOINT.

FROM golang:1.7.3
WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html  
COPY app.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
- ENTRYPOINT [ "/opt/app/run.sh", "--port", "8080" ]

FROM alpine:latest  
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=0 /go/src/github.com/alexellis/href-counter/app .
ENTRYPOINT [ "/opt/app/run.sh", "--port", "8080" ]

Read more: