Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Image couldn't run successfully. #16

Open
bbbturan opened this issue Feb 14, 2022 · 0 comments
Open

Docker Image couldn't run successfully. #16

bbbturan opened this issue Feb 14, 2022 · 0 comments

Comments

@bbbturan
Copy link

bbbturan commented Feb 14, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant