Skip to content

Commit

Permalink
fix(build): add Dockerfile for container build
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklasfrahm committed Aug 6, 2022
1 parent 0b533f7 commit 3767fe4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build/package/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM golang:alpine AS build

WORKDIR /app
RUN apk add --no-cache make

# Install dependencies.
COPY go.* ./
RUN go mod download

# Copy source files and build application.
COPY . /app
ARG VERSION
RUN VERSION=${VERSION} make -B && mv bin/* /app/bin/netadm

# Create minimal container image.
FROM alpine AS run
COPY --from=build /app/bin/netadm /netadm
CMD [ "/netadm" ]

0 comments on commit 3767fe4

Please sign in to comment.