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

Without main file system useless. No possible to assemble docker image #149

Open
AntexMv opened this issue Aug 8, 2022 · 1 comment
Open

Comments

@AntexMv
Copy link

AntexMv commented Aug 8, 2022

Somebody forget to add most important file
COPY failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder413771057/dist/mikrotik-exporter_linux_amd64: no such file or directory
mikrotik-exporter_linux_amd64
Without it system useless. No possible to assemble docker image

@aaron2198
Copy link

You could modify the dockerfile like this in order to build the app in a container.

FROM golang:1.13 AS builder

WORKDIR /usr/src/app

COPY go.mod go.sum ./

RUN go mod download && go mod verify
COPY . .

RUN go build -v -o /usr/local/bin/mikrotik-exporter

FROM debian:9.9-slim

EXPOSE 9436

COPY scripts/start.sh /app/
COPY --from=builder /usr/local/bin/mikrotik-exporter /app/mikrotik-exporter

RUN chmod 755 /app/*

ENTRYPOINT ["/app/start.sh"]

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

2 participants