Skip to content

Commit

Permalink
Add Dockerfile for all controllers
Browse files Browse the repository at this point in the history
Signed-off-by: Xudong Sun <[email protected]>
  • Loading branch information
marshtompsxd committed Sep 6, 2023
1 parent dae4305 commit 15dc7f0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ src/*.long-type-*.txt
src/.verus-log/
reference-controllers/*-controller/target/
e2e/target/
Dockerfile
18 changes: 18 additions & 0 deletions docker/controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ghcr.io/vmware-research/verifiable-controllers/verus:latest as builder

ARG APP
WORKDIR /anvil

SHELL ["/bin/bash", "-c"]

COPY . .

RUN VERUS_DIR=/verus ./build.sh ${APP}_controller.rs --no-verify --time -o controller

# =============================================================================

FROM debian:bullseye-slim

COPY --from=builder /anvil/src/controller /usr/local/bin/controller

ENTRYPOINT ["/usr/local/bin/controller", "run"]
1 change: 1 addition & 0 deletions local-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ app=$1
# Copy the Dockerfile and build the docker image of the controller
cp docker/controller/Dockerfile .
docker build -t local/$app-controller:v0.1.0 --build-arg APP=$app .
rm Dockerfile
# Set up the kind cluster and load the image into the cluster
kind create cluster --config deploy/kind.yaml
kind load docker-image local/$app-controller:v0.1.0
Expand Down

0 comments on commit 15dc7f0

Please sign in to comment.