Skip to content

Commit 5c2685c

Browse files
committed
Go 1.9, Ubuntu 16 for the container
Just making everything a little bit better.
1 parent 37a6123 commit 5c2685c

4 files changed

Lines changed: 33 additions & 20 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:15.10
1+
FROM ubuntu:16.04
22
MAINTAINER Bob Van Zant <bob@veznat.com>
33
LABEL Description="ssh-cert-authority"
44
RUN apt-get update && apt-get install -y openssh-client && apt-get clean && rm -rf /var/lib/apt

Dockerfile-buildenv

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:15.10
1+
FROM ubuntu:16.04
22
MAINTAINER Bob Van Zant <bob@veznat.com>
33
LABEL Description="up-to-date ubuntu environment" Vendor="Cloudtools"
44

@@ -12,18 +12,20 @@ RUN apt-get update && \
1212

1313
LABEL Description="up-to-date golang environment"
1414

15-
RUN mkdir -p /build
16-
RUN curl -O https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
17-
RUN tar -C /usr/local -xzf go1.7.linux-amd64.tar.gz
15+
RUN mkdir -p /build \
16+
&& curl -O https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz \
17+
&& echo "d70eadefce8e160638a9a6db97f7192d8463069ab33138893ad3bf31b0650a79 go1.9.linux-amd64.tar.gz" | sha256sum -c - \
18+
&& tar -C /usr/local -xzf go1.9.linux-amd64.tar.gz \
19+
&& rm -f go1.9.linux-amd64.tar.gz
1820

1921
ENV GOROOT_BOOTSTRAP=/usr/local/go
2022
ENV GOROOT=/build/go-build/go
2123
ENV PATH=/build/go-build/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin
2224

2325
RUN mkdir -p /build/go-build \
2426
&& cd /build/go-build \
25-
&& curl -o go.tar.gz -s https://storage.googleapis.com/golang/go1.7.src.tar.gz \
26-
&& echo "ca53aca78b60a7b3168a3e3df5a08546a634d043 go.tar.gz" | sha1sum -c - \
27+
&& curl -o go.tar.gz -s https://storage.googleapis.com/golang/go1.9.src.tar.gz \
28+
&& echo "a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993 go.tar.gz" | sha256sum -c - \
2729
&& tar -zxf go.tar.gz \
2830
&& cd /build/go-build/go/src \
2931
&& GOOS=darwin GOARCH=amd64 ./make.bash --no-clean 2>&1 > /dev/null ;

Makefile

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,30 @@ VERSION := $(shell echo `git describe --tags --long --match=*.*.* --dirty` | sed
33

44
PKG=github.com/cloudtools/ssh-cert-authority
55

6+
.PHONY: test vet
7+
8+
ssh-cert-authority:
9+
go build -ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
10+
11+
ssh-cert-authority-linux-amd64:
12+
GOOS=linux GOARCH=amd64 \
13+
go build -o ssh-cert-authority-linux-amd64 \
14+
-ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
15+
16+
ssh-cert-authority-linux-amd64.gz: ssh-cert-authority-linux-amd64
17+
gzip -f ssh-cert-authority-linux-amd64
18+
19+
ssh-cert-authority-darwin-amd64:
20+
GOOS=darwin GOARCH=amd64 \
21+
go build -o ssh-cert-authority-darwin-amd64 \
22+
-ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .
23+
24+
ssh-cert-authority-darwin-amd64.gz: ssh-cert-authority-darwin-amd64
25+
gzip -f ssh-cert-authority-darwin-amd64
26+
627
test:
7-
go test ./...
28+
@go test ./...
829

930
vet:
10-
go vet ./...
31+
@go vet ./...
1132

12-
all: test
13-
go build -ldflags "-X ${PKG}/version.Tag=${TAG} -X ${PKG}/version.BuildVersion=${VERSION}" .

build.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
#!/bin/bash -e
22

33
go get
4-
go test ./...
4+
make test ssh-cert-authority-linux-amd64.gz ssh-cert-authority-darwin-amd64.gz
55

6-
ARCHITECTURES=amd64
7-
OPERATING_SYSTEMS="linux darwin"
8-
for GOARCH in $ARCHITECTURES; do
9-
for GOOS in $OPERATING_SYSTEMS; do
10-
GOOS=$GOOS GOARCH=$GOARCH go build -o ssh-cert-authority-$GOOS-$GOARCH
11-
gzip -f ssh-cert-authority-$GOOS-$GOARCH
12-
done
13-
done

0 commit comments

Comments
 (0)