From 813c06d31dd6ffeeb8e4eebb78608d33d1cf87d0 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Mon, 29 Aug 2022 10:27:25 +0200 Subject: [PATCH] Fix debug container script Signed-off-by: Trivernis --- Containerfile | 1 - run-isolated.sh | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Containerfile b/Containerfile index e617e1f..20cbd38 100644 --- a/Containerfile +++ b/Containerfile @@ -11,7 +11,6 @@ RUN cargo new amethyst WORKDIR /usr/src/amethyst COPY Cargo.toml Cargo.lock ./ RUN mkdir target -COPY target/debug/build ./target/debug/build RUN cargo fetch COPY src ./src RUN cargo build --frozen diff --git a/run-isolated.sh b/run-isolated.sh index 2b79c16..910618b 100755 --- a/run-isolated.sh +++ b/run-isolated.sh @@ -1,4 +1,7 @@ #!/bin/bash -podman build . -t ame-debug \ -&& podman container rm ame-debug \ -&& podman run -i -t --name ame-debug ame-debug +podman build . -t ame-debug + +if [ $? -eq 0 ]; then + podman container exists ame-debug && podman container rm ame-debug + podman run -i -t --name ame-debug ame-debug +fi \ No newline at end of file