-
Notifications
You must be signed in to change notification settings - Fork 502
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 #3078 from jacekn/friendbot_docker
Add friendbot Dockerfile and Makefile
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 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
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,13 @@ | ||
# Check if we need to prepend docker commands with sudo | ||
SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") | ||
|
||
# If TAG is not provided set default value | ||
TAG ?= stellar/friendbot:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n)) | ||
|
||
docker-build: | ||
cd ../../ && \ | ||
$(SUDO) docker build -f services/friendbot/docker/Dockerfile -t $(TAG) . | ||
|
||
docker-push: | ||
cd ../../ && \ | ||
$(SUDO) docker push $(TAG) |
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,12 @@ | ||
FROM golang:1.14-stretch as build | ||
|
||
ADD . /src/friendbot | ||
WORKDIR /src/friendbot | ||
RUN go build -o /bin/friendbot ./services/friendbot | ||
|
||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates | ||
COPY --from=build /bin/friendbot /app/ | ||
EXPOSE 8004 | ||
ENTRYPOINT ["/app/friendbot"] |