diff --git a/.github/workflows/create_release_and_build.yml b/.github/workflows/create_release_and_build.yml index e1bf3ee..2a4b26f 100644 --- a/.github/workflows/create_release_and_build.yml +++ b/.github/workflows/create_release_and_build.yml @@ -82,7 +82,6 @@ jobs: --push \ -f containerised/Dockerfile . - - name: Release uses: softprops/action-gh-release@v1 with: diff --git a/containerised/Dockerfile b/containerised/Dockerfile index acff8c2..18e9953 100644 --- a/containerised/Dockerfile +++ b/containerised/Dockerfile @@ -6,6 +6,7 @@ FROM --platform=linux/amd64 rust:slim as builder ARG TARGETARCH +# These are build platform depandant, but will be ignored if not needed ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER="aarch64-linux-gnu-gcc" ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-lgcc" ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER="arm-linux-gnueabihf-ld" diff --git a/containerised/Dockerfile_dev b/containerised/Dockerfile_dev new file mode 100644 index 0000000..ea142ab --- /dev/null +++ b/containerised/Dockerfile_dev @@ -0,0 +1,15 @@ +############# +## Runtime ## +############# + +FROM alpine:latest AS runtime + +# Copy application binary from builder image +COPY ./target/x86_64-unknown-linux-musl/release/oxker /usr/local/bin +COPY ./containerised/start_oxker.sh ./ + +# Run the application +ENTRYPOINT [ "./start_oxker.sh"] + +# One liner to build musl program, build docker image, then execute the image +# cargo build --release --target x86_64-unknown-linux-musl && docker build -t oxker_dev -f containerised/Dockerfile_dev . && docker run --rm -it --volume /var/run/docker.sock:/var/run/docker.sock:ro oxker_dev \ No newline at end of file diff --git a/containerised/platform.sh b/containerised/platform.sh index 43da224..393769a 100644 --- a/containerised/platform.sh +++ b/containerised/platform.sh @@ -1,5 +1,4 @@ #!/bin/sh - # Used in Docker build to set platform dependent variables case $TARGETARCH in