Skip to content

Commit

Permalink
Update docker images to use Go Modules and 1.12.15
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Jan 31, 2020
1 parent b8a8e90 commit 1da673b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 12 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12.12
FROM golang:1.12.15

RUN apt-get update && apt-get install -y \
curl \
Expand All @@ -22,4 +22,6 @@ ENV NOTARYDIR /go/src/github.com/theupdateframework/notary
COPY . ${NOTARYDIR}
RUN chmod -R a+rw /go && chmod 0600 ${NOTARYDIR}/fixtures/database/*

ENV GO111MODULE=on

WORKDIR ${NOTARYDIR}
3 changes: 2 additions & 1 deletion cross.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dockercore/golang-cross:1.12.12
FROM dockercore/golang-cross:1.12.14

RUN apt-get update && apt-get install -y \
curl \
Expand All @@ -18,6 +18,7 @@ RUN useradd -ms /bin/bash notary \
&& go get golang.org/x/lint/golint github.com/fzipp/gocyclo github.com/client9/misspell/cmd/misspell github.com/gordonklaus/ineffassign github.com/securego/gosec/cmd/gosec/...

ENV NOTARYDIR /go/src/github.com/theupdateframework/notary
ENV GO111MODULE=on

COPY . ${NOTARYDIR}
RUN chmod -R a+rw /go
Expand Down
3 changes: 2 additions & 1 deletion escrow.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM golang:1.12.12-alpine
FROM golang:1.12.15-alpine

ENV NOTARYPKG github.com/theupdateframework/notary
ENV GO111MODULE=on

# Copy the local repo to the expected go path
COPY . /go/src/${NOTARYPKG}
Expand Down
6 changes: 4 additions & 2 deletions server.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM golang:1.12.12-alpine
FROM golang:1.12.15-alpine

RUN apk add --update git gcc libc-dev

ENV GO111MODULE=on

ARG MIGRATE_VER=v4.6.2
RUN GO111MODULE=on go get -tags 'mysql postgres file' github.com/golang-migrate/migrate/v4/cli@${MIGRATE_VER} && mv /go/bin/cli /go/bin/migrate
RUN go get -tags 'mysql postgres file' github.com/golang-migrate/migrate/v4/cli@${MIGRATE_VER} && mv /go/bin/cli /go/bin/migrate

ENV NOTARYPKG github.com/theupdateframework/notary

Expand Down
7 changes: 5 additions & 2 deletions server.minimal.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM golang:1.12.12-alpine AS build-env
FROM golang:1.12.15-alpine AS build-env

RUN apk add --update git gcc libc-dev

ENV GO111MODULE=on

ARG MIGRATE_VER=v4.6.2
RUN GO111MODULE=on go get -tags 'mysql postgres file' github.com/golang-migrate/migrate/v4/cli@${MIGRATE_VER} && mv /go/bin/cli /go/bin/migrate
RUN go get -tags 'mysql postgres file' github.com/golang-migrate/migrate/v4/cli@${MIGRATE_VER} && mv /go/bin/cli /go/bin/migrate

ENV NOTARYPKG github.com/theupdateframework/notary

Expand Down
6 changes: 4 additions & 2 deletions signer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM golang:1.12.12-alpine
FROM golang:1.12.15-alpine

RUN apk add --update git gcc libc-dev

ENV GO111MODULE=on

ARG MIGRATE_VER=v4.6.2
RUN GO111MODULE=on go get -tags 'mysql postgres file' github.com/golang-migrate/migrate/v4/cli@${MIGRATE_VER} && mv /go/bin/cli /go/bin/migrate
RUN go get -tags 'mysql postgres file' github.com/golang-migrate/migrate/v4/cli@${MIGRATE_VER} && mv /go/bin/cli /go/bin/migrate

ENV NOTARYPKG github.com/theupdateframework/notary

Expand Down
8 changes: 5 additions & 3 deletions signer.minimal.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM golang:1.12.12-alpine AS build-env
FROM golang:1.12.15-alpine AS build-env

RUN apk add --update git gcc libc-dev

ARG MIGRATE_VER=v4.6.2
RUN GO111MODULE=on go get -tags 'mysql postgres file' github.com/golang-migrate/migrate/v4/cli@${MIGRATE_VER} && mv /go/bin/cli /go/bin/migrate
ENV GO111MODULE=on

ARG MIGRATE_VER=v4.6.2
RUN go get -tags 'mysql postgres file' github.com/golang-migrate/migrate/v4/cli@${MIGRATE_VER} && mv /go/bin/cli /go/bin/migrate

ENV NOTARYPKG github.com/theupdateframework/notary

Expand Down

0 comments on commit 1da673b

Please sign in to comment.