Skip to content

Commit

Permalink
update to golang 1.10.3 at alpine 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Jul 22, 2018
1 parent eaa6c95 commit 0bfe7db
Show file tree
Hide file tree
Showing 8 changed files with 450 additions and 1,405 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
FROM golang:1.10.3-alpine3.7 AS BUILD
FROM golang:1.10.3-alpine3.8 AS BUILD

MAINTAINER CMGS <[email protected]>

ENV LIBGIT2VERSION 0.26.4

# make binary
RUN apk add --no-cache build-base musl-dev libgit2-dev git curl make cmake python\
&& curl https://glide.sh/get | sh \
&& go get -d github.com/projecteru2/core
RUN wget -c https://github.com/libgit2/libgit2/archive/v$LIBGIT2VERSION.tar.gz -O - | tar -xz
RUN cd libgit2-$LIBGIT2VERSION && cmake . && make && cp libgit2.so* /tmp && make install
WORKDIR /go/src/github.com/projecteru2/core
RUN make build && ./eru-core --version

FROM alpine:3.7
FROM alpine:3.8

MAINTAINER CMGS <[email protected]>

RUN mkdir /etc/eru/
LABEL ERU=1 version=latest
RUN apk --no-cache add libcurl libssh2 && rm -rf /var/cache/apk/*
COPY --from=BUILD /tmp/libgit2.so.26 /usr/lib/libgit2.so.26
COPY --from=BUILD /tmp/libgit2.so.0.26.4 /usr/lib/libgit2.so.0.26.4
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GO_LDFLAGS ?= -s -X $(REPO_PATH)/versioninfo.REVISION=$(REVISION) \

grpc:
cd ./rpc/gen/; protoc --go_out=plugins=grpc:. core.proto
cd ./rpc/gen/; python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. core.proto;
cd ./rpc/gen/; python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. core.proto;

deps:
glide i
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ Run `make deps` for generating vendor dir.
Under macOS we have to install `libgit2` manually, if you using [Homebrew](https://brew.sh/) please install like this:

```shell
# libgit2 version 0.25.1
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
gco 9c527911c8c630355d92df001575cacbb4a8b8b4 libgit2.rb
# libgit2 version 0.27.x
HOMEBREW_NO_AUTO_UPDATE=1 brew install libgit2
make deps
```
Expand Down
4 changes: 2 additions & 2 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ stages:
- pack
builds:
build:
base: "golang:1.9.1-alpine3.6"
base: "golang:1.10.3-alpine3.8"
# only support ssh protocol
repo: "[email protected]:projecteru2/core.git"
version: "HEAD"
Expand All @@ -33,7 +33,7 @@ builds:
# HTTP_PROXY: <HTTP_PROXY>
# HTTPS_PROXY: <HTTPS_PROXY>
pack:
base: alpine:3.6
base: alpine:3.8
labels:
ERU: 1
version: latest
Expand Down
31 changes: 8 additions & 23 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import:
- context
- package: google.golang.org/grpc
version: master
- package: gopkg.in/libgit2/git2go.v26
- package: gopkg.in/libgit2/git2go.v27
- package: gopkg.in/yaml.v2
- package: github.com/coreos/go-semver
version: ^0.2.0
Expand Down
Loading

0 comments on commit 0bfe7db

Please sign in to comment.