-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from seatgeek/use-go-mod
Upgrade to Go 1.13.7 and use go mod
- Loading branch information
Showing
10 changed files
with
239 additions
and
586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
vendor/ | ||
!vendor/vendor.json | ||
conf.d/ | ||
# Files | ||
.gitignore | ||
ci.sh | ||
LICENSE | ||
Makefile | ||
README.md | ||
|
||
# Folders | ||
.git/ | ||
build/ | ||
conf.d/ | ||
examples/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
FROM ubuntu:trusty | ||
# | ||
# Build Go binaries | ||
# | ||
FROM golang:1.13.7 as builder | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y ssl-cert ca-certificates \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# Define the build path | ||
WORKDIR /root/go/src/github.com/seatgeek/hashi-helper | ||
|
||
COPY build/hashi-helper-linux-amd64 /hashi-helper | ||
# Disable CGO | ||
ENV CGO_ENABLED=0 | ||
|
||
# Copy go mod and sum files | ||
COPY go.mod go.sum ./ | ||
|
||
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed | ||
RUN go mod download | ||
|
||
# Copy the source from the current directory to the Working Directory inside the container | ||
COPY . . | ||
|
||
# Build the Go app | ||
RUN go build -o /bin/hashi-helper | ||
|
||
# | ||
# Runtime container | ||
# | ||
FROM ubuntu:bionic | ||
|
||
# Copy the binary from builder | ||
COPY --from=builder /bin/hashi-helper /hashi-helper | ||
|
||
# Configure entrypoint | ||
ENTRYPOINT ["/hashi-helper"] |
Oops, something went wrong.