Skip to content

Commit

Permalink
testing smaller docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
MSevey committed Jul 11, 2024
1 parent 4a8197a commit 2eda1f2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
curl \
jq \
ranger \
vim \
libc6 \
ca-certificates \
&& apt-get clean \
Expand Down Expand Up @@ -51,26 +49,33 @@ RUN sed -i '/wasmd start/s/^/#/' init.sh
RUN bash init.sh

# Stage 2: Create a minimal runtime image
FROM debian:bullseye-slim
FROM debian:bookworm-slim

# Install only the necessary runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
curl \
ranger \
jq \
vim \
ca-certificates \
libc6 \
&& 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

# Ensure the wasmd binary is executable
RUN chmod +x /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
# Copy over wasmd depenendencies
RUN mkdir -p /go/pkg/mod/github.com/!cosm!wasm/[email protected]
COPY --from=build-env /go/pkg/mod/github.com/!cosm!wasm/[email protected]/ /go/pkg/mod/github.com/!cosm!wasm/[email protected]/

EXPOSE 36657 36656 9290

Expand Down
11 changes: 9 additions & 2 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

da_node = import_module("github.com/rollkit/local-da/[email protected]")


def run(plan):
##########
# DA
Expand Down Expand Up @@ -40,7 +41,7 @@ def run(plan):
name="wasm",
config=ServiceConfig(
# Using CosmWasm version v0.1.0
image="ghcr.io/rollkit/cosmwasm:a661153",
image="ghcr.io/rollkit/cosmwasm:ad0e9e4",
# Use ImageBuildSpec when testing changes to Dockerfile
# image = ImageBuildSpec(
# image_name="cosmwasm",
Expand All @@ -51,7 +52,12 @@ def run(plan):
public_ports=wasmd_ports,
ready_conditions=ReadyCondition(
recipe=ExecRecipe(
command=["wasmd", "status", "-n", "tcp://127.0.0.1:{0}".format(rpc_port_number)],
command=[
"wasmd",
"status",
"-n",
"tcp://127.0.0.1:{0}".format(rpc_port_number),
],
extract={
"output": "fromjson | .node_info.network",
},
Expand All @@ -70,6 +76,7 @@ def run(plan):
)
plan.print("CosmWasm service is available at {0}".format(wasm_address))


def defaultPortSpec(port_number):
return PortSpec(
number=port_number,
Expand Down

0 comments on commit 2eda1f2

Please sign in to comment.