Skip to content

Commit

Permalink
Preparing for v1.11.2 release
Browse files Browse the repository at this point in the history
Removing `gitpod` and Substreams CLI + Rust Docker image as the `substreams-dev-starter` is better.
  • Loading branch information
maoueh committed Dec 12, 2024
1 parent 740ac10 commit f4090af
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.github
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
34 changes: 11 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
# syntax=docker/dockerfile:1.2
FROM --platform=$BUILDPLATFORM golang:1.23-bullseye AS build

FROM rust:1.60-bullseye as rust
WORKDIR /src

FROM ubuntu:20.04
ARG TARGETOS TARGETARCH VERSION=dev

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
gcc libssl-dev pkg-config protobuf-compiler \
ca-certificates libssl1.1 vim strace lsof curl jq && \
rm -rf /var/cache/apt /var/lib/apt/lists/*

ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.60.0
RUN --mount=target=. \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-X \"main.version=$VERSION\"" -o /app/substreams ./cmd/substreams

COPY --from=rust /usr/local/cargo /usr/local/cargo/
COPY --from=rust /usr/local/rustup /usr/local/rustup/
FROM ubuntu:22.04

# The `cargo install rustfmt || true` part serves the purposes of updating the crate registry, it's really
# hard to update the registry standalone without a package, so we take a detour by installing a component
# that will requires to update the crate registry
RUN rustup target install wasm32-unknown-unknown && rustup component add rustfmt && cargo install rustfmt || true

ADD /substreams /app/substreams
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get -y install -y ca-certificates libssl3

# ENV PATH "/app:$HOME/.cargo/bin:$PATH"
ENV PATH "/app:/usr/local/cargo/bin:$PATH"
COPY --from=build /app/substreams /app/substreams

ENTRYPOINT ["/app/substreams"]
19 changes: 0 additions & 19 deletions Dockerfile.github

This file was deleted.

14 changes: 0 additions & 14 deletions Dockerfile.gitpod

This file was deleted.

15 changes: 11 additions & 4 deletions docs/new/common/installing-the-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ Used for connecting to endpoints, streaming data in real time, and packaging cus
brew install streamingfast/tap/substreams
```

### Docker Alias

You can use our published Substreams CLI Docker image an assign an alias to Docker. We mount the API token as `SF_API_TOKEN` in the alias so that credentials are known to the CLI running inside Docker.

```bash
alias substreams='docker run --rm -it -e="SF_API_TOKEN=$SF_API_TOKEN" ghcr.io/streamingfast/substreams'
```

> [!NOTE]
> Expansion of `$SF_API_TOKEN` above happens at command runtime, so you must ensure that it is set correctly in your own host environment.
### Pre-compiled binary installation

There are several CLI binaries available for different operating systems. Choose the correct platform in the [CLI releases page](https://github.com/streamingfast/substreams/releases).
Expand Down Expand Up @@ -57,10 +68,6 @@ A successful installation will print the version that you have installed.
substreams version dev
```

{% hint style="info" %}
**Note**: You can [also use Gitpod](../developers-guide/installation-requirements.md) instead of a local installation.
{% endhint %}

## Install Other Developer Dependencies (Only for Substreams Developers)

If you plan to build your own Substreams (i.e. write Rust code to extract data from the blockchain), you will need several dependencies to set up your developer environment:
Expand Down
3 changes: 2 additions & 1 deletion docs/release-notes/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## v1.11.2

* Rebuilt of v1.11.1 to generate Docker `latest` tag with revamp Docker image building.
* Substreams CLI is now built with using Ubuntu 22, previous releases were built using Ubuntu 20.
* Substreams Docker image is now using `ubuntu:22` as its base, previous releases were built using `ubuntu:20.04`.

Expand Down

0 comments on commit f4090af

Please sign in to comment.