Skip to content

Commit e7e9409

Browse files
authored
Merge pull request #18 from initia-labs/feat/fix-dockerfile
fix: add move library with version and arch
2 parents bc39e5b + 5f0e2e7 commit e7e9409

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

dockerfiles/Dockerfile.informative

+18-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,27 @@ COPY ../informative-indexer /informative-indexer
55

66
RUN go build -o /informative-indexer.bin .
77

8-
FROM ubuntu:latest
8+
FROM ubuntu:22.04
99

10-
RUN apt-get update && apt-get install -y ca-certificates
10+
ENV MOVEVM_VERSION=v0.6.1
11+
12+
RUN apt-get update && apt-get install -y ca-certificates wget
1113

1214
WORKDIR /informative-indexer
15+
1316
COPY --from=builder /informative-indexer.bin /informative-indexer.bin
1417

18+
RUN ARCH=$(dpkg --print-architecture) && \
19+
if [ "$ARCH" = "amd64" ]; then \
20+
MOVEVM_ARCH="x86_64"; \
21+
elif [ "$ARCH" = "arm64" ]; then \
22+
MOVEVM_ARCH="aarch64"; \
23+
else \
24+
echo "Unsupported architecture: $ARCH" && exit 1; \
25+
fi && \
26+
wget -O /lib/libmovevm.${MOVEVM_ARCH}.so \
27+
https://github.com/initia-labs/movevm/releases/download/${MOVEVM_VERSION}/libmovevm.${MOVEVM_ARCH}.so && \
28+
wget -O /lib/libcompiler.${MOVEVM_ARCH}.so \
29+
https://github.com/initia-labs/movevm/releases/download/${MOVEVM_VERSION}/libcompiler.${MOVEVM_ARCH}.so
30+
1531
CMD ["/informative-indexer.bin"]

informative-indexer/flusher/flusher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func NewFlusher(config *Config) (*Flusher, error) {
184184
storageClient, err = storage.NewGCSClient()
185185
if err != nil {
186186
common.CaptureCurrentHubException(err, sentry.LevelFatal)
187-
logger.Fatal().Msgf("Storage: Error creating Storage client: %v\n", err)
187+
logger.Fatal().Msgf("Storage: Error creating storage client: %v\n", err)
188188
return nil, err
189189
}
190190
}

informative-indexer/prunner/prunner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewPrunner(config *PrunnerConfig) (*Prunner, error) {
5757
} else {
5858
storageClient, err = storage.NewGCSClient()
5959
if err != nil {
60-
logger.Fatal().Msgf("Storage: Error creating Storage client: %v\n", err)
60+
logger.Fatal().Msgf("Storage: Error creating storage client: %v\n", err)
6161
return nil, err
6262
}
6363
}

informative-indexer/sweeper/sweeper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func NewSweeper(config *SweeperConfig) (*Sweeper, error) {
168168
storageClient, err = storage.NewGCSClient()
169169
if err != nil {
170170
common.CaptureCurrentHubException(err, sentry.LevelFatal)
171-
logger.Fatal().Msgf("Storage: Error creating Storage client: %v\n", err)
171+
logger.Fatal().Msgf("Storage: Error creating storage client: %v\n", err)
172172
return nil, err
173173
}
174174
}

0 commit comments

Comments
 (0)