Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps and Alpine image #2665

Merged
merged 2 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
354 changes: 163 additions & 191 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ syslog = "6.0.1" # Needs to be v4 until fern is updated
# Logging
log = "0.4.17"
fern = { version = "0.6.1", features = ["syslog-6"] }
tracing = { version = "0.1.35", features = ["log"] } # Needed to have lettre and webauthn-rs trace logging to work
tracing = { version = "0.1.36", features = ["log"] } # Needed to have lettre and webauthn-rs trace logging to work

backtrace = "0.3.66" # Logging panics to logfile instead stderr only

Expand All @@ -61,10 +61,10 @@ dashmap = "5.3.4" # Concurrent hashmap implementation

# Async futures
futures = "0.3.21"
tokio = { version = "1.20.0", features = ["rt-multi-thread", "fs", "io-util", "parking_lot", "time"] }
tokio = { version = "1.20.1", features = ["rt-multi-thread", "fs", "io-util", "parking_lot", "time"] }

# A generic serialization/deserialization framework
serde = { version = "1.0.139", features = ["derive"] }
serde = { version = "1.0.140", features = ["derive"] }
serde_json = "1.0.82"

# A safe, extensible ORM and Query builder
Expand All @@ -83,7 +83,7 @@ uuid = { version = "1.1.2", features = ["v4"] }

# Date and time libraries
chrono = { version = "0.4.19", features = ["clock", "serde"], default-features = false }
chrono-tz = "0.6.1"
chrono-tz = "0.6.3"
time = "0.3.11"

# Job scheduler
Expand All @@ -108,11 +108,11 @@ webauthn-rs = "0.3.2"
url = "2.2.2"

# Email librariese-Base, Update crates and small change.
lettre = { version = "0.10.0", features = ["smtp-transport", "builder", "serde", "tokio1-native-tls", "hostname", "tracing", "tokio1"], default-features = false }
lettre = { version = "0.10.1", features = ["smtp-transport", "builder", "serde", "tokio1-native-tls", "hostname", "tracing", "tokio1"], default-features = false }
percent-encoding = "2.1.0" # URL encoding library used for URL's in the emails

# Template library
handlebars = { version = "4.3.2", features = ["dir_source"] }
handlebars = { version = "4.3.3", features = ["dir_source"] }

# HTTP client
reqwest = { version = "0.11.11", features = ["stream", "json", "gzip", "brotli", "socks", "cookies", "trust-dns"] }
Expand All @@ -121,8 +121,8 @@ reqwest = { version = "0.11.11", features = ["stream", "json", "gzip", "brotli",
html5gum = "0.5.2"
regex = { version = "1.6.0", features = ["std", "perf", "unicode-perl"], default-features = false }
data-url = "0.1.1"
bytes = "1.1.0"
cached = "0.36.0"
bytes = "1.2.1"
cached = "0.37.0"

# Used for custom short lived cookie jar during favicon extraction
cookie = "0.16.0"
Expand Down
16 changes: 4 additions & 12 deletions docker/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
{% if "alpine" in target_file %}
{% if "amd64" in target_file %}
{% set build_stage_base_image = "blackdex/rust-musl:x86_64-musl-stable-1.61.0" %}
{% set runtime_stage_base_image = "alpine:3.15" %}
{% set runtime_stage_base_image = "alpine:3.16" %}
{% set package_arch_target = "x86_64-unknown-linux-musl" %}
{% elif "armv7" in target_file %}
{% set build_stage_base_image = "blackdex/rust-musl:armv7-musleabihf-stable-1.61.0" %}
{% set runtime_stage_base_image = "balenalib/armv7hf-alpine:3.15" %}
{% set runtime_stage_base_image = "balenalib/armv7hf-alpine:3.16" %}
{% set package_arch_target = "armv7-unknown-linux-musleabihf" %}
{% elif "armv6" in target_file %}
{% set build_stage_base_image = "blackdex/rust-musl:arm-musleabi-stable-1.61.0" %}
{% set runtime_stage_base_image = "balenalib/rpi-alpine:3.15" %}
{% set runtime_stage_base_image = "balenalib/rpi-alpine:3.16" %}
{% set package_arch_target = "arm-unknown-linux-musleabi" %}
{% elif "arm64" in target_file %}
{% set build_stage_base_image = "blackdex/rust-musl:aarch64-musl-stable-1.61.0" %}
{% set runtime_stage_base_image = "balenalib/aarch64-alpine:3.15" %}
{% set runtime_stage_base_image = "balenalib/aarch64-alpine:3.16" %}
{% set package_arch_target = "aarch64-unknown-linux-musl" %}
{% endif %}
{% elif "amd64" in target_file %}
Expand Down Expand Up @@ -206,15 +206,13 @@ RUN mkdir /data \
openssl \
tzdata \
curl \
dumb-init \
ca-certificates
{% else %}
&& apt-get update && apt-get install -y \
--no-install-recommends \
openssl \
ca-certificates \
curl \
dumb-init \
libmariadb-dev-compat \
libpq5 \
&& apt-get clean \
Expand Down Expand Up @@ -253,10 +251,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
7 changes: 0 additions & 7 deletions docker/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ RUN mkdir /data \
openssl \
ca-certificates \
curl \
dumb-init \
libmariadb-dev-compat \
libpq5 \
&& apt-get clean \
Expand All @@ -123,10 +122,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
9 changes: 1 addition & 8 deletions docker/amd64/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ RUN cargo build --features ${DB} --release --target=x86_64-unknown-linux-musl
######################## RUNTIME IMAGE ########################
# Create a new stage with a minimal image
# because we already have a binary built
FROM alpine:3.15
FROM alpine:3.16

ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
Expand All @@ -96,7 +96,6 @@ RUN mkdir /data \
openssl \
tzdata \
curl \
dumb-init \
ca-certificates


Expand All @@ -115,10 +114,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
7 changes: 0 additions & 7 deletions docker/amd64/Dockerfile.buildx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ RUN mkdir /data \
openssl \
ca-certificates \
curl \
dumb-init \
libmariadb-dev-compat \
libpq5 \
&& apt-get clean \
Expand All @@ -123,10 +122,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
9 changes: 1 addition & 8 deletions docker/amd64/Dockerfile.buildx.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.
######################## RUNTIME IMAGE ########################
# Create a new stage with a minimal image
# because we already have a binary built
FROM alpine:3.15
FROM alpine:3.16

ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
Expand All @@ -96,7 +96,6 @@ RUN mkdir /data \
openssl \
tzdata \
curl \
dumb-init \
ca-certificates


Expand All @@ -115,10 +114,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
7 changes: 0 additions & 7 deletions docker/arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ RUN mkdir /data \
openssl \
ca-certificates \
curl \
dumb-init \
libmariadb-dev-compat \
libpq5 \
&& apt-get clean \
Expand All @@ -147,10 +146,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
9 changes: 1 addition & 8 deletions docker/arm64/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ RUN cargo build --features ${DB} --release --target=aarch64-unknown-linux-musl
######################## RUNTIME IMAGE ########################
# Create a new stage with a minimal image
# because we already have a binary built
FROM balenalib/aarch64-alpine:3.15
FROM balenalib/aarch64-alpine:3.16

ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
Expand All @@ -98,7 +98,6 @@ RUN mkdir /data \
openssl \
tzdata \
curl \
dumb-init \
ca-certificates

# hadolint ignore=DL3059
Expand All @@ -119,10 +118,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
7 changes: 0 additions & 7 deletions docker/arm64/Dockerfile.buildx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ RUN mkdir /data \
openssl \
ca-certificates \
curl \
dumb-init \
libmariadb-dev-compat \
libpq5 \
&& apt-get clean \
Expand All @@ -147,10 +146,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
9 changes: 1 addition & 8 deletions docker/arm64/Dockerfile.buildx.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.
######################## RUNTIME IMAGE ########################
# Create a new stage with a minimal image
# because we already have a binary built
FROM balenalib/aarch64-alpine:3.15
FROM balenalib/aarch64-alpine:3.16

ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
Expand All @@ -98,7 +98,6 @@ RUN mkdir /data \
openssl \
tzdata \
curl \
dumb-init \
ca-certificates

# hadolint ignore=DL3059
Expand All @@ -119,10 +118,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
7 changes: 0 additions & 7 deletions docker/armv6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ RUN mkdir /data \
openssl \
ca-certificates \
curl \
dumb-init \
libmariadb-dev-compat \
libpq5 \
&& apt-get clean \
Expand Down Expand Up @@ -152,10 +151,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
9 changes: 1 addition & 8 deletions docker/armv6/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ RUN cargo build --features ${DB} --release --target=arm-unknown-linux-musleabi
######################## RUNTIME IMAGE ########################
# Create a new stage with a minimal image
# because we already have a binary built
FROM balenalib/rpi-alpine:3.15
FROM balenalib/rpi-alpine:3.16

ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
Expand All @@ -100,7 +100,6 @@ RUN mkdir /data \
openssl \
tzdata \
curl \
dumb-init \
ca-certificates

# hadolint ignore=DL3059
Expand All @@ -121,10 +120,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
7 changes: 0 additions & 7 deletions docker/armv6/Dockerfile.buildx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ RUN mkdir /data \
openssl \
ca-certificates \
curl \
dumb-init \
libmariadb-dev-compat \
libpq5 \
&& apt-get clean \
Expand Down Expand Up @@ -152,10 +151,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
9 changes: 1 addition & 8 deletions docker/armv6/Dockerfile.buildx.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ RUN --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.
######################## RUNTIME IMAGE ########################
# Create a new stage with a minimal image
# because we already have a binary built
FROM balenalib/rpi-alpine:3.15
FROM balenalib/rpi-alpine:3.16

ENV ROCKET_PROFILE="release" \
ROCKET_ADDRESS=0.0.0.0 \
Expand All @@ -100,7 +100,6 @@ RUN mkdir /data \
openssl \
tzdata \
curl \
dumb-init \
ca-certificates

# hadolint ignore=DL3059
Expand All @@ -121,10 +120,4 @@ COPY docker/start.sh /start.sh

HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"]

# Configures the startup!
# We should be able to remove the dumb-init now with Rocket 0.5
# But the balenalib images have some issues with there entry.sh
# See: https://github.com/balena-io-library/base-images/issues/735
# Lets keep using dumb-init for now, since that is working fine.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/start.sh"]
Loading