Skip to content

Commit da73ba0

Browse files
authored
Merge pull request #3 from utilitywarehouse/update-build
Update dependencies
2 parents f3f8f33 + c3cf266 commit da73ba0

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM golang:alpine AS build
1+
FROM golang:1.15-alpine AS build
22
WORKDIR /go/src/github.com/utilitywarehouse/ssh-key-agent
33
COPY . /go/src/github.com/utilitywarehouse/ssh-key-agent
44
RUN apk --no-cache add git &&\
55
go get ./... &&\
66
CGO_ENABLED=0 go build -o /ssh-key-agent .
77

8-
FROM alpine:3.8
8+
FROM alpine:3.12
99
RUN apk add --no-cache ca-certificates
1010
COPY --from=build /ssh-key-agent /ssh-key-agent
1111
CMD [ "/ssh-key-agent" ]

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
[![Docker Repository on Quay](https://quay.io/repository/utilitywarehouse/ssh-key-agent/status "Docker Repository on Quay")](https://quay.io/repository/utilitywarehouse/ssh-key-agent)
44

5-
Companion service for https://github.com/utilitywarehouse/ssh-key-manager runs on the host and populates `authorized_keys` file based on the groups provided.
5+
Companion service for https://github.com/utilitywarehouse/ssh-key-manager runs
6+
on the host and populates `authorized_keys` file based on the groups provided.
67

78
### client
89

main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ var (
2525
akfLoc = os.Getenv("SKA_AKF_LOC")
2626
)
2727

28-
type Map struct {
28+
type keyMap struct {
2929
LastUpdated string `json:"last_updated"`
30-
Groups []Group `json:"groups"`
30+
Groups []group `json:"groups"`
3131
}
3232

33-
type Group struct {
33+
type group struct {
3434
Name string `json:"name"`
3535
Keys []string `json:"keys"`
3636
}
@@ -55,7 +55,7 @@ func validate() {
5555
}
5656
}
5757

58-
func keysFromMap(keyMap *Map) (keys []string) {
58+
func keysFromMap(keyMap *keyMap) (keys []string) {
5959
var rawKeys []string
6060
groupNames := strings.Split(groups, ",")
6161
for _, gn := range groupNames {
@@ -102,7 +102,7 @@ func writeKeys(keys []string) {
102102
}
103103

104104
func updateKeys() {
105-
var keyMap Map
105+
var keyMap keyMap
106106
resp, err := http.Get(uri)
107107
defer func() {
108108
io.Copy(ioutil.Discard, resp.Body)

0 commit comments

Comments
 (0)