diff --git a/.gitignore b/.gitignore index 5fab61e22..caff8d3cb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,3 @@ src/*.long-type-*.txt src/.verus-log/ reference-controllers/*-controller/target/ e2e/target/ -Dockerfile diff --git a/docker/controller/Dockerfile b/docker/controller/Dockerfile new file mode 100644 index 000000000..8401c7b29 --- /dev/null +++ b/docker/controller/Dockerfile @@ -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"] diff --git a/local-test.sh b/local-test.sh index d7d6e672a..839f274c6 100755 --- a/local-test.sh +++ b/local-test.sh @@ -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