Skip to content

Docker Image couldn't run successfully. #16

@bbbturan

Description

@bbbturan

Hello,
I'm trying to run the docker image on cmd as you mentioned in the documentation. But it's getting failed with

Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "--restart": executable file not found in $PATH: unknown.`
error.

I updated the docker file as below;

`FROM golang:latest
WORKDIR /go/src/github.com/twistlock/cloud-discovery/
COPY . .
RUN go fmt ./...
RUN go vet ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app cmd/server/main.go
FROM alpine:latest
RUN apk --no-cache add ca-certificates nmap
WORKDIR /licenses
COPY /licenses/* ./
WORKDIR /root/
COPY --from=0 /go/src/github.com/twistlock/cloud-discovery/app .
CMD ["./app"]

But it didn't work and got the same error previous one.
Could you please assist me on this point?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions