From 6c74c295eba61f867277821b8d35c72fd43e33ac Mon Sep 17 00:00:00 2001 From: Anmol Date: Mon, 13 May 2024 19:44:54 +0530 Subject: [PATCH] add dockerfile for neutron-query-relayer (#441) --- .../relayers/neutron-query-relayer/Dockerfile | 34 +++++++++++++++++++ .../neutron-query-relayer/versions.yaml | 5 +++ 2 files changed, 39 insertions(+) create mode 100644 starship/docker/relayers/neutron-query-relayer/Dockerfile create mode 100644 starship/docker/relayers/neutron-query-relayer/versions.yaml diff --git a/starship/docker/relayers/neutron-query-relayer/Dockerfile b/starship/docker/relayers/neutron-query-relayer/Dockerfile new file mode 100644 index 000000000..319a92147 --- /dev/null +++ b/starship/docker/relayers/neutron-query-relayer/Dockerfile @@ -0,0 +1,34 @@ +ARG BASE_IMAGE +ARG VERSION +FROM ${BASE_IMAGE} as builder + +LABEL org.opencontainers.image.source="https://github.com/cosmology-tech/starship" + +USER root + +RUN apt update && apt -y install ca-certificates jq bash curl sed unzip -y + +ENV CODE_NAME="neutron-query-relayer" +ENV VERSION=${VERSION:-"refs/heads/main"} +ENV CODE_REF=${CODE_REF:-"https://github.com/neutron-org/neutron-query-relayer/archive"} + +ADD $CODE_REF/$VERSION.zip /tmp +RUN mkdir /app && cd /tmp && unzip ${VERSION##*/}.zip && mv /tmp/${CODE_NAME}-${VERSION##*/}/* /app + +WORKDIR /app + +RUN go mod download +RUN go build -a -o build/neutron_query_relayer ./cmd/neutron_query_relayer/*.go + +FROM debian:buster + +RUN apt update && apt install ca-certificates jq bash curl sed -y && apt-get clean + +ADD ["https://github.com/CosmWasm/wasmvm/releases/download/v1.5.2/libwasmvm.x86_64.so","https://github.com/CosmWasm/wasmvm/releases/download/v1.5.2/libwasmvm.aarch64.so","/lib/"] + +COPY --from=builder /app/run.sh . +COPY --from=builder /app/build/neutron_query_relayer /bin/ + +EXPOSE 9999 + +ENTRYPOINT ["neutron_query_relayer", "start"] diff --git a/starship/docker/relayers/neutron-query-relayer/versions.yaml b/starship/docker/relayers/neutron-query-relayer/versions.yaml new file mode 100644 index 000000000..2adef8372 --- /dev/null +++ b/starship/docker/relayers/neutron-query-relayer/versions.yaml @@ -0,0 +1,5 @@ +base: golang:1.21-bullseye +versions: + - refs/heads/main + - refs/tags/v0.2.0 + - refs/tags/v0.1.1