This repository has been archived by the owner on Nov 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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 #20 from adam-stanek/docker-split
Split docker files
- Loading branch information
Showing
5 changed files
with
46 additions
and
40 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM golang:1.15-buster AS build | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends bash curl git ca-certificates | ||
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
|
||
WORKDIR /go/src/github.com/analogj/lodestone-publisher/ | ||
|
||
ADD Gopkg.toml ./ | ||
ADD Gopkg.lock ./ | ||
ADD cmd ./cmd | ||
ADD pkg ./pkg | ||
|
||
RUN dep ensure | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/lodestone-email-publisher ./cmd/email-publisher/email-publisher.go | ||
RUN mkdir tmp | ||
|
||
FROM scratch | ||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=build /go/src/github.com/analogj/lodestone-publisher/tmp /tmp | ||
COPY --from=build /go/src/github.com/analogj/lodestone-publisher/bin/lodestone-email-publisher /lodestone-email-publisher | ||
CMD ["/lodestone-email-publisher"] |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:1.15-buster AS build | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends bash curl git | ||
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
|
||
WORKDIR /go/src/github.com/analogj/lodestone-publisher/ | ||
|
||
ADD Gopkg.toml ./ | ||
ADD Gopkg.lock ./ | ||
ADD cmd ./cmd | ||
ADD pkg ./pkg | ||
|
||
RUN dep ensure | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o lodestone-fs-publisher ./cmd/fs-publisher/fs-publisher.go | ||
|
||
FROM scratch | ||
COPY --from=build /go/src/github.com/analogj/lodestone-publisher/lodestone-fs-publisher /lodestone-fs-publisher | ||
CMD ["/lodestone-fs-publisher"] |
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,13 @@ | ||
# lodestone-publisher | ||
|
||
|
||
# Local Development | ||
# How to build | ||
|
||
``` | ||
docker build --tag=lodestone-publisher . | ||
docker run -v `pwd`:/go/src/github.com/analogj/lodestone-publisher/ lodestone-publisher | ||
```bash | ||
docker build -f Dockerfile.fs -t lodestone-fs-publisher . | ||
docker run lodestone-fs-publisher | ||
|
||
docker build -f Dockerfile.email -t lodestone-email-publisher . | ||
docker run lodestone-email-processor | ||
``` | ||
|
This file was deleted.
Oops, something went wrong.