Skip to content

Commit

Permalink
apply from nshttpd#67 pr
Browse files Browse the repository at this point in the history
  • Loading branch information
moolex committed Apr 30, 2021
1 parent ee9f4d0 commit ccc1aef
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 70 deletions.
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM debian:9.9-slim

EXPOSE 9436

COPY scripts/start.sh /app/
COPY dist/mikrotik-exporter_linux_amd64 /app/mikrotik-exporter

RUN chmod 755 /app/*

ENTRYPOINT ["/app/start.sh"]
FROM golang:1.16 AS builder
WORKDIR /go/src/app
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build

FROM scratch
COPY --from=builder /go/src/app/mikrotik-exporter /mikrotik-exporter
ENTRYPOINT ["/mikrotik-exporter"]
14 changes: 7 additions & 7 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM arm64v8/busybox:1.31.0
FROM golang:1.16 AS builder
WORKDIR /go/src/app
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build

EXPOSE 9090

COPY scripts/start.sh /app/
COPY dist/mikrotik-exporter_linux_arm64 /app/mikrotik-exporter

ENTRYPOINT ["/app/start.sh"]
FROM scratch
COPY --from=builder /go/src/app/mikrotik-exporter /mikrotik-exporter
ENTRYPOINT ["/mikrotik-exporter"]
18 changes: 8 additions & 10 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM arm32v7/busybox:1.27.2

EXPOSE 9090

COPY scripts/start.sh /app/
COPY dist/mikrotik-exporter_linux_arm /app/mikrotik-exporter

RUN chmod 755 /app/*

ENTRYPOINT ["/app/start.sh"]
FROM golang:1.16 AS builder
WORKDIR /go/src/app
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm go build

FROM scratch
COPY --from=builder /go/src/app/mikrotik-exporter /mikrotik-exporter
ENTRYPOINT ["/mikrotik-exporter"]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mikrotik-exporter

go 1.13
go 1.16

require (
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
Expand Down
15 changes: 0 additions & 15 deletions scripts/build-armhf.sh

This file was deleted.

15 changes: 0 additions & 15 deletions scripts/build.sh

This file was deleted.

12 changes: 0 additions & 12 deletions scripts/start.sh

This file was deleted.

0 comments on commit ccc1aef

Please sign in to comment.