Skip to content

Commit daa533a

Browse files
committed
fix: Remove openssl vendoring, binary builds
OpenSSL vendoring was causing issues with builds on Windows so I think for now it's probably best to just remove it and the binary builds that required it. This means that releases will no longer include executables, but the Docker images are still published and the source code can be compiled for the target platform by the user. It might be worth revisiting binary builds in the future with static linking, but I don't have the time (or the use-case at $WORK) to do that at the moment and would like to avoid this being a blocker.
1 parent ef89b57 commit daa533a

File tree

4 files changed

+5
-41
lines changed

4 files changed

+5
-41
lines changed

.github/workflows/release.yaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,3 @@ jobs:
1818
with:
1919
# (required) GitHub token for creating GitHub Releases.
2020
token: ${{ secrets.GITHUB_TOKEN }}
21-
22-
upload-assets:
23-
needs: create-release
24-
strategy:
25-
matrix:
26-
include:
27-
- target: x86_64-unknown-linux-gnu
28-
- target: x86_64-unknown-linux-musl
29-
- target: aarch64-unknown-linux-gnu
30-
- target: aarch64-unknown-linux-musl
31-
runs-on: ubuntu-latest
32-
steps:
33-
- uses: actions/checkout@v4
34-
# Install dependencies
35-
# latest commit as of 2024-06-13
36-
- uses: awalsh128/cache-apt-pkgs-action@f2fc6d1af4d6abf8a4dcd37fd74a9a15c2273b9f
37-
with:
38-
packages: libssl-dev pkg-config
39-
# v1.21.0 as of 2024-06-13
40-
- uses: taiki-e/upload-rust-binary-action@b988355f8b505d51359af5c8d4afc3646c3fac1e
41-
with:
42-
bin: prodzilla
43-
target: ${{ matrix.target }}
44-
tar: unix
45-
zip: windows
46-
token: ${{ secrets.GITHUB_TOKEN }}

Cargo.lock

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ version = "0.0.3-rc.5"
66
edition = "2021"
77

88
[dependencies]
9-
openssl = { version = "0.10", features = ["vendored"] }
109
axum = { version = "0.7.2" }
1110
serde = { version = "1.0", features = ["derive"] }
1211
serde_json = "1.0.68"

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
ARG RUST_VERSION=1.78
44

5-
FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-alpine AS build
5+
FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-slim-bookworm AS build
66

77
WORKDIR /app
88

9-
RUN apk add --no-cache musl-dev perl make
9+
RUN apt-get update -y && apt-get install -y libssl-dev pkg-config
1010

1111
COPY . .
1212
RUN cargo build --locked --release --target-dir target && cp ./target/release/prodzilla /bin/prodzilla
1313

14-
FROM alpine:3.18 AS final
14+
FROM debian:bookworm-slim AS final
1515

16+
RUN apt-get update && apt-get install -y libssl-dev ca-certificates
1617
# Create a non-privileged user that the app will run under.
1718
# See https://docs.docker.com/go/dockerfile-user-best-practices/
1819
ARG UID=10001
@@ -26,6 +27,7 @@ RUN adduser \
2627
appuser
2728
USER appuser
2829

30+
2931
# Copy the executable from the "build" stage.
3032
COPY --from=build /bin/prodzilla /bin/
3133

0 commit comments

Comments
 (0)