From 0bd317b7ce6f9f42a614c488099b5fc7a14d91c7 Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Sat, 4 Feb 2023 04:07:01 +0000 Subject: [PATCH 1/5] fix: container scratch image --- containerised/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/containerised/Dockerfile b/containerised/Dockerfile index 9d0fe10..257754f 100644 --- a/containerised/Dockerfile +++ b/containerised/Dockerfile @@ -2,7 +2,7 @@ ## Builder ## ############# -FROM --platform=linux/amd64 rust:slim as builder +FROM --platform=linux/amd64 rust:slim as BUILDER ARG TARGETARCH @@ -49,13 +49,13 @@ RUN cp /usr/src/oxker/target/$(cat /.platform)/release/oxker / ## Runtime ## ############# -FROM alpine:latest AS runtime +FROM scratch AS RUNTIME # Set an ENV that we're running in a container, so that the application can sleep for 250ms at start ENV OXKER_RUNTIME=container # Copy application binary from builder image -COPY --from=builder /oxker /usr/local/bin +COPY --from=BUILDER /oxker /usr/local/bin # Run the application # this is used in the application itself, to stop itself show when running from a docker container, so DO NOT EDIT From 88b6549db41a98ce7da06452b59c953ac1748c0e Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Sat, 4 Feb 2023 04:12:47 +0000 Subject: [PATCH 2/5] docs: changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c70df5f..a4a7c2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### Fixes ++ Container runner `FROM scratch` (missing from v0.2.2 D'oh), this now should actually reduce Docker image size by ~60%, [0bd317b7ce6f9f42a614c488099b5fc7a14d91c7] + # v0.2.2 ### 2023-02-04 From f8dc90ebfae543aea6a55e5ddf0b56726557e278 Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Sat, 4 Feb 2023 04:15:26 +0000 Subject: [PATCH 3/5] docs: changelog --- containerised/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containerised/Dockerfile b/containerised/Dockerfile index 257754f..1b40165 100644 --- a/containerised/Dockerfile +++ b/containerised/Dockerfile @@ -55,7 +55,7 @@ FROM scratch AS RUNTIME ENV OXKER_RUNTIME=container # Copy application binary from builder image -COPY --from=BUILDER /oxker /usr/local/bin +COPY --from=BUILDER /oxker /app/ # Run the application # this is used in the application itself, to stop itself show when running from a docker container, so DO NOT EDIT From cc9127c6b4fa6fbe2be395b5de964272026511ad Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Sat, 4 Feb 2023 04:16:29 +0000 Subject: [PATCH 4/5] docs: changelog --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ebfa982..afcfe0e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,4 +11,4 @@ Don't hesitate to submit any issues or pull requests, regardless of size. ## Conduct -oxker follow the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct) \ No newline at end of file +oxker follows the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct) \ No newline at end of file From 17cbee0ebc3339996c89f1ab4148d4d67bfe7932 Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Sat, 4 Feb 2023 04:27:49 +0000 Subject: [PATCH 5/5] chore: release v0.2.3 --- .github/release-body.md | 14 ++------------ CHANGELOG.md | 5 ++++- Cargo.lock | 2 +- Cargo.toml | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/release-body.md b/.github/release-body.md index fb82468..d57c0a8 100644 --- a/.github/release-body.md +++ b/.github/release-body.md @@ -1,17 +1,7 @@ ### 2023-02-04 -### Chores -+ devcontainer.json updated, typos-cli installed, temporary(?) buildkit fix, [3c6a8db6ef74d499b49fabe8912785cac16d9c4b] -+ create_release.sh check for typos, [310a63f4cabaa374797a7e4ed0d7fd1f5e79c8fe] - -### Docs -+ AUR install instructions, thanks [orhun](https://github.com/orhun), [c5aa346bca139cc5ece1f4127293977924d16fca] -+ typos fixes, thanks [kianmeng](https://github.com/kianmeng), [5052d7ab0a156c43cadbd922c0019b284f24943a] -+ Readme.md styling tweak, [310a63f4cabaa374797a7e4ed0d7fd1f5e79c8fe] -+ Contributing guide, [5aaa00d6a3c58d98cb250b7b14584238df02961c], [a44b15f76088561a0e272d4e7456197c2aaabdb4] - -### Features -+ Use a scratch container for the docker image, should reduce image size by around 60%. This checks for the ENV `OXKER_RUNTIME=container`, which is automatically set by the docker image, [17b71b6b41f6a98a0f92277f40a88f4b1b8a1328] +### Fixes ++ Container runner `FROM scratch` (missing from v0.2.2 D'oh), this now should actually reduce Docker image size by ~60%, [0bd317b7ce6f9f42a614c488099b5fc7a14d91c7] see CHANGELOG.md for more details diff --git a/CHANGELOG.md b/CHANGELOG.md index a4a7c2e..1a6618f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ +# v0.2.3 +### 2023-02-04 + ### Fixes -+ Container runner `FROM scratch` (missing from v0.2.2 D'oh), this now should actually reduce Docker image size by ~60%, [0bd317b7ce6f9f42a614c488099b5fc7a14d91c7] ++ Container runner `FROM scratch` (missing from v0.2.2 D'oh), this now should actually reduce Docker image size by ~60%, [0bd317b7](https://github.com/mrjackwills/oxker/commit/0bd317b7ce6f9f42a614c488099b5fc7a14d91c7) # v0.2.2 ### 2023-02-04 diff --git a/Cargo.lock b/Cargo.lock index f7785bd..837bd00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -696,7 +696,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "oxker" -version = "0.2.2" +version = "0.2.3" dependencies = [ "anyhow", "bollard", diff --git a/Cargo.toml b/Cargo.toml index 2521eb8..28cbe37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxker" -version = "0.2.2" +version = "0.2.3" edition = "2021" authors = ["Jack Wills "] description = "A simple tui to view & control docker containers"