Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into func_buffered
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed Sep 27, 2024
2 parents 94285c0 + 9e0c2c0 commit 52bb0bd
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions services/horizon/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# install Core from apt "stable" or "unstable" pool, and horizon from apt "testing" pool
FROM ubuntu:focal

ARG VERSION
Expand Down
19 changes: 19 additions & 0 deletions services/horizon/docker/Dockerfile.core-testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# install both horizon and core from apt "testing" pool
FROM ubuntu:focal

ARG VERSION
ARG STELLAR_CORE_VERSION
ARG DEBIAN_FRONTEND=noninteractive
ARG ALLOW_CORE_UNSTABLE=no

RUN apt-get update && apt-get install -y wget apt-transport-https gnupg2 && \
wget -qO /etc/apt/trusted.gpg.d/SDF.asc https://apt.stellar.org/SDF.asc && \
echo "deb https://apt.stellar.org focal testing" | tee -a /etc/apt/sources.list.d/SDF.list && \
cat /etc/apt/sources.list.d/SDF.list && \
apt-get update && \
apt-cache madison stellar-core && eval "apt-get install -y stellar-core${STELLAR_CORE_VERSION+=$STELLAR_CORE_VERSION}" && \
apt-cache madison stellar-horizon && apt-get install -y stellar-horizon=${VERSION} && \
apt-get clean && rm -rf /var/lib/apt/lists/* /var/log/*.log /var/log/*/*.log

EXPOSE 8000
ENTRYPOINT ["/usr/bin/stellar-horizon"]
18 changes: 18 additions & 0 deletions services/horizon/docker/Dockerfile.stable
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# install Core from apt "stable"and horizon from apt "stable" pool
FROM ubuntu:focal

ARG VERSION
ARG STELLAR_CORE_VERSION
ARG DEBIAN_FRONTEND=noninteractive
ARG ALLOW_CORE_UNSTABLE=no

RUN apt-get update && apt-get install -y wget apt-transport-https gnupg2 && \
wget -qO /etc/apt/trusted.gpg.d/SDF.asc https://apt.stellar.org/SDF.asc && \
echo "deb https://apt.stellar.org focal stable" | tee -a /etc/apt/sources.list.d/SDF.list && \
cat /etc/apt/sources.list.d/SDF.list && \
apt-get update && apt-cache madison stellar-core && eval "apt-get install -y stellar-core${STELLAR_CORE_VERSION+=$STELLAR_CORE_VERSION}" && \
apt-cache madison stellar-horizon && apt-get install -y stellar-horizon=${VERSION} && \
apt-get clean && rm -rf /var/lib/apt/lists/* /var/log/*.log /var/log/*/*.log

EXPOSE 8000
ENTRYPOINT ["/usr/bin/stellar-horizon"]
29 changes: 29 additions & 0 deletions services/horizon/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BUILD_DATE := $(shell date -u +%FT%TZ)

TAG ?= stellar/stellar-horizon:$(VERSION)

# build with Core from apt "stable" or "unstable", and horizon from apt "testing"
docker-build:
ifndef VERSION
$(error VERSION environment variable must be set. For example VERSION=2.4.1-101 )
Expand All @@ -22,6 +23,34 @@ else
-t $(TAG) .
endif

# build Core and Horizon from apt "testing"
docker-build-core-testing:
ifndef VERSION
$(error VERSION environment variable must be set. For example VERSION=2.4.1-101 )
endif
ifndef STELLAR_CORE_VERSION
$(error STELLAR_CORE_VERSION environment variable must be set. )
else
$(SUDO) docker build --file ./Dockerfile.core-testing --pull $(DOCKER_OPTS) \
--label org.opencontainers.image.created="$(BUILD_DATE)" \
--build-arg VERSION=$(VERSION) --build-arg STELLAR_CORE_VERSION=$(STELLAR_CORE_VERSION) \
-t $(TAG) .
endif

# build Core and Horizon from apt "stable"
docker-build-core-stable:
ifndef VERSION
$(error VERSION environment variable must be set. For example VERSION=2.4.1-101 )
endif
ifndef STELLAR_CORE_VERSION
$(error STELLAR_CORE_VERSION environment variable must be set. )
else
$(SUDO) docker build --file ./Dockerfile.stable --pull $(DOCKER_OPTS) \
--label org.opencontainers.image.created="$(BUILD_DATE)" \
--build-arg VERSION=$(VERSION) --build-arg STELLAR_CORE_VERSION=$(STELLAR_CORE_VERSION) \
-t $(TAG) .
endif

docker-push:
ifndef TAG
$(error Must set VERSION or TAG environment variable. For example VERSION=2.4.1-101 )
Expand Down

0 comments on commit 52bb0bd

Please sign in to comment.