diff --git a/docker/scribe.Dockerfile b/docker/scribe.Dockerfile new file mode 100644 index 0000000000..593e10a8be --- /dev/null +++ b/docker/scribe.Dockerfile @@ -0,0 +1,17 @@ +# TODO: we should use alpine here +FROM ubuntu:latest + +LABEL org.label-schema.description="Scribe Docker file" +LABEL org.label-schema.name="ghcr.io/synapsecns/sanguine/scribe" +LABEL org.label-schema.schema-version="1.0.0" +LABEL org.label-schema.vcs-url="https://github.com/synapsecns/sanguine" +LABEL org.opencontainers.image.source="https://github.com/synapsecns/sanguine" + +RUN apt-get update +RUN apt-get install ca-certificates -y +RUN update-ca-certificates + +WORKDIR /app +COPY scribe /app/scribe + +ENTRYPOINT ["/app/scribe"] diff --git a/services/scribe/.goreleaser.yaml b/services/scribe/.goreleaser.yaml index 7431036ec1..40ce5db95b 100644 --- a/services/scribe/.goreleaser.yaml +++ b/services/scribe/.goreleaser.yaml @@ -5,7 +5,23 @@ monorepo: dir: services/scribe/ builds: - - skip: true + # Linux AMD64 + - id: scribe + binary: scribe + env: + - CGO_CFLAGS=-I/usr/local/include + - CGO_ENABLED=1 + - CGO_LDFLAGS=-L/usr/local/lib -lrocksdb -lstdc++ -lm -lz -lsnappy -lzstd -lbz2 + # see: https://github.com/cosmos/iavl/pull/465/files + ldflags: + - -s -w + main: main.go + flags: + - -tags=builtin_static,rocksdb,static + goos: + - linux + goarch: + - amd64 # add a source archive at release time source: @@ -34,3 +50,14 @@ checksum: # Add a changelog changelog: sort: asc + +dockers: + # Docker AMD64 + - goos: linux + goarch: amd64 + image_templates: + - 'ghcr.io/synapsecns/sanguine/scribe:latest' + - 'ghcr.io/synapsecns/sanguine/scribe:{{ .Tag }}' + dockerfile: ../../docker/scribe.Dockerfile + ids: + - scribe