Skip to content

Commit

Permalink
Add a Dockerfile to reproduce the soroban-rpc .deb install issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Bellamy committed Apr 12, 2023
1 parent 1682460 commit 659f7f9
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM golang as builder

# Install rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
RUN chmod a+x rustup.sh && ./rustup.sh -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Build soroban-rpc
RUN git clone https://github.com/stellar/soroban-tools.git
WORKDIR soroban-tools
RUN make build
RUN go build -o /stellar-soroban-rpc ./cmd/soroban-rpc



FROM ubuntu:focal
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
build-essential \
debhelper \
devscripts \
dh-systemd \
fakeroot \
lsb-release \
wget

# Install the stellar apt repo
RUN wget -qO - https://apt.stellar.org/SDF.asc | apt-key add -
RUN echo "deb https://apt.stellar.org $(lsb_release -cs) unstable" | tee -a /etc/apt/sources.list.d/SDF.list
RUN apt-get update

# Add our debian package contents
COPY . /packages
WORKDIR /packages

# Add soroban-rpc binary
COPY --from=builder /stellar-soroban-rpc /packages/stellar-soroban-rpc/stellar-soroban-rpc

# Configure the debian package build
ARG VERSION=0.7.2
ARG BUILD_NUMBER=1
ARG CORE_VERSION=19.8.1-1250.064a2787a.focal~soroban
RUN sed -i "s/_VERSION_/$VERSION/" stellar-soroban-rpc/debian/changelog
RUN sed -i "s/_BUILD_VERSION_/$BUILD_NUMBER/" stellar-soroban-rpc/debian/changelog
RUN sed -i "s/_CORE_VERSION_/$CORE_VERSION/" stellar-soroban-rpc/debian/control
RUN sed -i "s/) stable;/) focal;/" stellar-soroban-rpc/debian/changelog

# Build the .deb package
RUN cd stellar-soroban-rpc && dpkg-buildpackage --no-sign

# Try to install the package
CMD apt install -y ./stellar-soroban-rpc_*.deb

0 comments on commit 659f7f9

Please sign in to comment.