diff --git a/Dockerfile b/Dockerfile index 72cc7db..987f2e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,6 +50,28 @@ RUN sed -i '/wasmd start/s/^/#/' init.sh RUN bash init.sh +# Stage 2: Create a minimal runtime image +FROM debian:bullseye-slim + +# Install only the necessary runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash \ + curl \ + jq \ + ca-certificates \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +WORKDIR /root + +# Copy the wasmd binary from the build stage +COPY --from=build-env /go/bin/wasmd /usr/bin/wasmd + +# Copy the .wasmd directory from the build stage +COPY --from=build-env /root/.wasmd /root/.wasmd + +# Ensure the wasmd binary is executable +RUN chmod +x /usr/bin/wasmd + EXPOSE 36657 36656 9290 # Keep the container running