Skip to content

Commit

Permalink
Use minideb in dockerfile and unify go versions (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Jose Medina authored Sep 17, 2018
1 parent f070921 commit 3fd984d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/golang:1.9
- image: circleci/golang:1.10-stretch

working_directory: /go/src/github.com/bitnami/render-template
steps:
Expand Down
18 changes: 16 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@
#
# docker run --rm -i -e WHO=bitnami bitnami/render-template <<<"hello {{WHO}}"
#
FROM ryotakatsuki/godev as build
FROM golang:1.10-stretch as build

RUN apt-get update && apt-get install -y --no-install-recommends \
git make upx \
&& rm -rf /var/lib/apt/lists/*

RUN wget -q -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && \
echo '287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 dep' | sha256sum -c - && \
mv dep /usr/bin/ && chmod +x /usr/bin/dep

RUN go get -u \
github.com/golang/lint/golint \
golang.org/x/tools/cmd/goimports \
github.com/golang/dep/cmd/dep \
&& rm -rf $GOPATH/src/* && rm -rf $GOPATH/pkg/*

WORKDIR /go/src/app
COPY . .
Expand All @@ -13,7 +27,7 @@ RUN make

RUN upx --ultra-brute out/render-template

FROM alpine:latest
FROM bitnami/minideb:stretch

COPY --from=build /go/src/app/out/render-template /usr/local/bin/

Expand Down

0 comments on commit 3fd984d

Please sign in to comment.