Skip to content

Commit

Permalink
Fix static linking segfaults by switching to rustls
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Nelson committed Aug 1, 2020
1 parent 9bcbaab commit c2971c4
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 23 deletions.
126 changes: 114 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM rust:alpine AS build
WORKDIR /usr/src/proxy
RUN apk add openssl-dev musl-dev \
&& rustup default nightly
COPY . .
RUN cargo install --path ./bin

FROM scratch
COPY --from=build /usr/local/cargo/bin/spectacles-proxy-bin /proxy
CMD ["/proxy"]
FROM rust:alpine AS build
WORKDIR /usr/src/proxy
RUN apk add openssl-dev musl-dev \
&& rustup default nightly
COPY . .
RUN cargo install --path ./bin

FROM scratch
COPY --from=build /usr/local/cargo/bin/spectacles-proxy-bin /proxy
CMD ["/proxy"]
6 changes: 5 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ edition = "2018"
[dependencies]
anyhow = "1.0"
log = "0.4"
reqwest = { version = "0.10", features = ["json"] }
serde = "1.0"
serde_json = "1.0"
tokio = { version = "0.2", features = ["blocking", "rt-core", "stream", "sync"] }
uriparse = "0.6"

redis = { version = "0.16", optional = true }

[dependencies.reqwest]
version = "0.10"
features = ["json", "rustls-tls"]
default-features = false

[features]
default = []
redis-ratelimiter = [
Expand Down

0 comments on commit c2971c4

Please sign in to comment.