-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from JackalLabs/docker
feat: Docker
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
FROM golang:1.23 AS builder | ||
|
||
WORKDIR /app | ||
|
||
# Copy the Go module manifests into /app | ||
COPY go.mod go.sum ./ | ||
|
||
# Download dependencies | ||
RUN go mod download | ||
|
||
# Copy the entire project | ||
COPY . . | ||
|
||
# Build the application using the Makefile | ||
RUN make install | ||
|
||
# Use a smaller image for the final runtime container | ||
FROM debian:bookworm-slim | ||
|
||
# Set up necessary environment variables | ||
ENV MULBERRY_HOME /root/.mulberry | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Download the libwasmvm.aarch64.so file directly from GitHub | ||
WORKDIR /tmp | ||
RUN wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm.aarch64.so \ | ||
-O /usr/local/lib/libwasmvm.aarch64.so && \ | ||
chmod 755 /usr/local/lib/libwasmvm.aarch64.so | ||
|
||
# Update the linker cache | ||
RUN ldconfig | ||
|
||
# Set the working directory | ||
WORKDIR /root/ | ||
|
||
# Copy the binary and configuration files from the builder | ||
COPY --from=builder /go/bin/mulberry /usr/local/bin/mulberry | ||
COPY --from=builder /app/config /root/.mulberry | ||
|
||
# Expose ports - not sure we need all of these | ||
EXPOSE 26657 | ||
EXPOSE 26656 | ||
EXPOSE 26658 | ||
EXPOSE 1317 | ||
EXPOSE 6060 | ||
EXPOSE 9090 | ||
|
||
# Command to initialize the system and start the service | ||
CMD ["sh", "-c", "mulberry wallet address && mulberry start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters