Skip to content

Commit 3fd984d

Browse files
author
Juan Jose Medina
authored
Use minideb in dockerfile and unify go versions (#1)
1 parent f070921 commit 3fd984d

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/golang:1.9
5+
- image: circleci/golang:1.10-stretch
66

77
working_directory: /go/src/github.com/bitnami/render-template
88
steps:

Dockerfile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22
#
33
# docker run --rm -i -e WHO=bitnami bitnami/render-template <<<"hello {{WHO}}"
44
#
5-
FROM ryotakatsuki/godev as build
5+
FROM golang:1.10-stretch as build
6+
7+
RUN apt-get update && apt-get install -y --no-install-recommends \
8+
git make upx \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
RUN wget -q -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && \
12+
echo '287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 dep' | sha256sum -c - && \
13+
mv dep /usr/bin/ && chmod +x /usr/bin/dep
14+
15+
RUN go get -u \
16+
github.com/golang/lint/golint \
17+
golang.org/x/tools/cmd/goimports \
18+
github.com/golang/dep/cmd/dep \
19+
&& rm -rf $GOPATH/src/* && rm -rf $GOPATH/pkg/*
620

721
WORKDIR /go/src/app
822
COPY . .
@@ -13,7 +27,7 @@ RUN make
1327

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

16-
FROM alpine:latest
30+
FROM bitnami/minideb:stretch
1731

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

0 commit comments

Comments
 (0)