Update rust to 1.46

Should add support for TLS 1.3

Also, this fixes the Alpine builds
This commit is contained in:
ViViDboarder 2020-09-28 14:58:23 -07:00
parent d19a0efae7
commit b04ee3a60a
4 changed files with 16 additions and 12 deletions

View File

@ -1,4 +1,4 @@
FROM rust:1.33
FROM rust:1.46
WORKDIR /usr/src/
RUN USER=root cargo new --bin bitwarden_rs_ldap

View File

@ -1,18 +1,17 @@
FROM ekidd/rust-musl-builder:1.33.0 AS builder
FROM ekidd/rust-musl-builder:1.46.0 AS builder
# Cache build deps
RUN USER=rust cargo init
COPY ./Cargo.toml ./Cargo.toml
COPY ./Cargo.lock ./Cargo.lock
RUN cargo build --release
COPY Cargo.toml Cargo.lock ./
RUN cargo build --locked --release
# Remove temp src
RUN rm src/*.rs
COPY ./src ./src
# Fix permissions on source
RUN USER=root chown -R rust:rust /home/rust/src/src
# Remove bins to make sure we rebuild
# RUN rm ./target/release/deps/bitwarden_rs_ldap*
COPY --chown=rust:rust ./src ./src
RUN touch ./src/main.rs
RUN cargo build --release
FROM alpine:3

View File

@ -52,3 +52,7 @@ clean:
.PHONY: docker-build
docker-build:
docker build -f ./Dockerfile -t $(DOCKER_TAG) .
.PHONY: docker-build-alpine
docker-build-alpine:
docker build -f ./Dockerfile.alpine -t $(DOCKER_TAG):alpine .

View File

@ -4,11 +4,12 @@ services:
ldap_sync:
build:
context: .
# dockerfile: Dockerfile.alpine
dockerfile: Dockerfile.alpine
volumes:
- ./example.config.toml:/usr/src/bitwarden_rs_ldap/config.toml:ro
- ./example.config.toml:/config.toml:ro
# ./root.cert:/usr/src/bitwarden_rs_ldap/root.cert:ro
environment:
CONFIG_PATH: /config.toml
RUST_BACKTRACE: 1
restart: always