Skip to content

Commit

Permalink
use debian sid slim replace alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Jun 24, 2019
1 parent edec27a commit d6a8831
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
26 changes: 14 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
FROM golang:alpine AS BUILD
FROM debian:sid-slim AS BUILD

MAINTAINER CMGS <[email protected]>

# make binary
RUN apk add --no-cache build-base musl-dev libgit2-dev git curl make cmake python\
&& go get -d github.com/projecteru2/core
WORKDIR /go/src/github.com/projecteru2/core
RUN make build && ./eru-core --version
RUN apt update \
&& apt install -y golang-1.12 git libgit2-dev make \
&& git clone https://github.com/projecteru2/core.git
WORKDIR /core
RUN export PATH=/usr/lib/go-1.12/bin:$PATH \
&& make build \
&& ./eru-core --version

FROM alpine:latest

MAINTAINER CMGS <[email protected]>
FROM debian:sid-slim

RUN mkdir /etc/eru/
LABEL ERU=1
RUN apk --no-cache add libcurl libssh2 libgit2 && rm -rf /var/cache/apk/*
COPY --from=BUILD /go/src/github.com/projecteru2/core/eru-core /usr/bin/eru-core
COPY --from=BUILD /go/src/github.com/projecteru2/core/core.yaml.sample /etc/eru/core.yaml.sample
RUN apt update \
&& apt install -y libgit2-27 libssh2-1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=BUILD /core/eru-core /usr/bin/eru-core
COPY --from=BUILD /core/core.yaml.sample /etc/eru/core.yaml.sample
19 changes: 19 additions & 0 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM golang:alpine AS BUILD

MAINTAINER CMGS <[email protected]>

# make binary
RUN apk add --no-cache build-base musl-dev libgit2-dev git curl make cmake python\
&& go get -d github.com/projecteru2/core
WORKDIR /go/src/github.com/projecteru2/core
RUN make build && ./eru-core --version

FROM alpine:latest

MAINTAINER CMGS <[email protected]>

RUN mkdir /etc/eru/
LABEL ERU=1
RUN apk --no-cache add libcurl libssh2 libgit2 && rm -rf /var/cache/apk/*
COPY --from=BUILD /go/src/github.com/projecteru2/core/eru-core /usr/bin/eru-core
COPY --from=BUILD /go/src/github.com/projecteru2/core/core.yaml.sample /etc/eru/core.yaml.sample

0 comments on commit d6a8831

Please sign in to comment.