Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Adjust docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
vladupshot committed Dec 29, 2023
1 parent a635547 commit f161a68
Showing 1 changed file with 35 additions and 17 deletions.
52 changes: 35 additions & 17 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,50 @@ ARG ghcr_token
WORKDIR /app

## curl, unzip other utilities
RUN apt-get update && \
apt-get install --no-install-recommends --assume-yes curl unzip pv ca-certificates gnupg2 python3 python3-pip
RUN apt update && \
apt -y dist-upgrade && \
apt install -y --no-install-recommends \
tzdata \
curl \
unzip \
pv \
ca-certificates \
gnupg2 \
python3 \
python3-pip && \
rm -rf /var/cache/apt/*

# gomplete for updating config with env vars
RUN curl -o ./gomplate -sSL https://github.com/hairyhenderson/gomplate/releases/download/v3.10.0/gomplate_linux-amd64
RUN chmod 755 gomplate
RUN curl -o ./gomplate -sSL https://github.com/hairyhenderson/gomplate/releases/download/v3.10.0/gomplate_linux-amd64 && \
chmod 755 gomplate

# get the runtime
RUN curl -o ./runtime.tar.gz -sSL https://github.com/blocklessnetwork/runtime/releases/download/v0.3.1/blockless-runtime.ubuntu-20.04.x86_64.tar.gz
RUN mkdir /app/runtime && tar -xvkf ./runtime.tar.gz -C /app/runtime
RUN python3 -m pip install --upgrade pip
RUN curl -o ./runtime.tar.gz -sSL https://github.com/blocklessnetwork/runtime/releases/download/v0.3.1/blockless-runtime.ubuntu-20.04.x86_64.tar.gz && \
mkdir /app/runtime && \
tar -xvkf ./runtime.tar.gz -C /app/runtime && \
rm ./runtime.tar.gz


# get the upshot-extension
RUN curl -L -s -H "Authorization: token ${ghcr_token}" -H 'Accept:application/octet-stream' "https://api.github.com/repos/upshot-tech/upshot-blockless-extension/releases/assets/142012669" -o upshot-extension.tar.gz
RUN mkdir /app/runtime/extensions && tar -xvkf ./upshot-extension.tar.gz -C /app/runtime/extensions
RUN curl -L -s -H "Authorization: token ${ghcr_token}" -H 'Accept:application/octet-stream' \
"https://api.github.com/repos/upshot-tech/upshot-blockless-extension/releases/assets/142012669" \
-o upshot-extension.tar.gz && \
mkdir /app/runtime/extensions && \
tar -xvkf ./upshot-extension.tar.gz -C /app/runtime/extensions && \
rm ./upshot-extension.tar.gz

# libssl 1.1
RUN curl -o ./libssl.deb -sSL http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
RUN dpkg -i ./libssl.deb
RUN curl -o ./libssl.deb -sSL http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
dpkg -i ./libssl.deb && \
rm ./libssl.deb

# Install AWS CLI so we can use to backup to IPFS s3 compatible storage providers
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip -d /usr/src && rm -f awscliv2.zip \
&& /usr/src/aws/install --bin-dir /usr/bin
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip -d /usr/src && \
rm -f awscliv2.zip && \
/usr/src/aws/install --bin-dir /usr/bin

## setup
## setup
RUN mkdir /app/keys
COPY --from=builder /src/dist/upshot-node upshot-node
COPY --from=builder /src/dist/upshot-keys upshot-keys
Expand All @@ -57,12 +75,12 @@ ENV KEY_PASSWORD=""
ENV CHAIN_RPC_NODE="http://0.0.0.0:26657"
ENV NODE_KEY_PATH=/app/keys/priv.bin
ENV WORKSPACE_ROOT=/tmp/node
ENV RUNETIME_PATH=/app/runtime
ENV RUNETIME_PATH=/app/runtime
ENV REST_API=8080
ENV P2P_PORT=9527

EXPOSE 8080 9527
# VOLUME ${APP_PATH}

## run script
ENTRYPOINT ["/app/run.sh"]
ENTRYPOINT ["/app/run.sh"]

0 comments on commit f161a68

Please sign in to comment.