Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lundgrenalex committed Sep 26, 2024
1 parent 2f04262 commit e2ecd92
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 9 deletions.
23 changes: 15 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
FROM golang:1.19.7-buster as build
FROM golang:1.22-alpine AS build

ENV GO111MODULE=on

RUN apk add --no-cache git make bash curl vim
RUN git config --global http.postBuffer 524288000

WORKDIR /kubo

COPY build/disable-blockstore-arc-cache.patch /patches/
# COPY build/disable-blockstore-arc-cache.patch /patches/

RUN git clone https://github.com/ipfs/kubo . && \
git checkout v0.19.2 && \
# Apply a patch for disabling the blockstore ARC cache
git apply /patches/disable-blockstore-arc-cache.patch
RUN git clone https://github.com/ipfs/kubo . && git checkout v0.30.0
# && git apply /patches/disable-blockstore-arc-cache.patch

COPY . /kubo/ipfs-go-ds-storj

# Build the kubo binary with the Storj datastore plugin from the current source code.
RUN echo "Adding the storjds plugin.."
RUN echo "" >> plugin/loader/preload_list
RUN echo "storjds storj.io/ipfs-go-ds-storj/plugin 0" >> plugin/loader/preload_list
RUN echo "Get plugin list to verify.."
RUN cat plugin/loader/preload_list

RUN go mod edit -replace storj.io/ipfs-go-ds-storj=./ipfs-go-ds-storj && \
echo "\nstorjds storj.io/ipfs-go-ds-storj/plugin 0" >> "plugin/loader/preload_list" && \
go mod tidy && \
# Next line is expected to fail
make build || true && \
go mod tidy && \
make build

# Target image
FROM ipfs/kubo:v0.19.2

FROM ipfs/kubo:v0.30.0

# Copy the ipfs from the build container.
ENV SRC_DIR /kubo
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,4 @@ require (
storj.io/picobuf v0.0.1 // indirect
)

go 1.19
go 1.22
Loading

0 comments on commit e2ecd92

Please sign in to comment.