From 2dd1496ef4de3f7661b39c2407d439507ba3d54f Mon Sep 17 00:00:00 2001 From: Geometrically <18202329+Geometrically@users.noreply.github.com> Date: Sun, 14 Nov 2021 16:27:33 -0700 Subject: [PATCH] Fix HTTPS requests not working in the image (#259) --- Dockerfile | 6 ++++++ src/routes/auth.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a5f4931f2..76f54d251 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,12 @@ RUN cargo build --release FROM debian:bullseye-slim + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates + +RUN update-ca-certificates + COPY --from=build /usr/src/labrinth/target/release/labrinth /labrinth/labrinth COPY --from=build /usr/src/labrinth/migrations/* /labrinth/migrations/ COPY --from=build /wait /wait diff --git a/src/routes/auth.rs b/src/routes/auth.rs index 2479bfb38..e38ef4b1d 100644 --- a/src/routes/auth.rs +++ b/src/routes/auth.rs @@ -27,7 +27,7 @@ pub enum AuthorizationError { DatabaseError(#[from] crate::database::models::DatabaseError), #[error("Error while parsing JSON: {0}")] SerDeError(#[from] serde_json::Error), - #[error("Error while communicating to GitHub OAuth2: {0}")] + #[error("Error while communicating to GitHub OAuth2")] GithubError(#[from] reqwest::Error), #[error("Invalid Authentication credentials")] InvalidCredentialsError,