-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
42 lines (30 loc) · 958 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#########################################
# Build stage
#########################################
FROM golang:1.8 AS builder
MAINTAINER Nicolas Carlier <[email protected]>
# Repository location
ARG REPOSITORY=github.com/nunux-keeper
# Artifact name
ARG ARTIFACT=keeper-cli
# Copy sources into the container
ADD . /go/src/$REPOSITORY/$ARTIFACT
# Set working directory
WORKDIR /go/src/$REPOSITORY/$ARTIFACT
# Build the binary
RUN make
#########################################
# Distribution stage
#########################################
FROM alpine
MAINTAINER Nicolas Carlier <[email protected]>
# Repository location
ARG REPOSITORY=github.com/nunux-keeper
# Artifact name
ARG ARTIFACT=keeper-cli
# App name
ARG APPNAME=keepctl
# Fix lib dep
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
# Install binary
COPY --from=builder /go/src/$REPOSITORY/$ARTIFACT/release/keepctl-linux-amd64 /usr/local/bin/keepctl