From b140937cda5423f515ef1e5476d126e5ea0d0c1d Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 7 Sep 2023 21:13:50 +0200 Subject: [PATCH] upgrade rust and node in docker image, optimize buildtimes --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ec6f4d..bd8c3da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:19-alpine3.16 as frontend-builder +FROM node:20-alpine3.18 as frontend-builder WORKDIR /app COPY yarn.lock package.json buildscript.js ./ @@ -6,7 +6,11 @@ COPY src ./src/ RUN yarn install --pure-lockfile RUN yarn build -FROM rust:1.66-alpine3.16 as builder +FROM rust:1.72-alpine3.18 as builder + +RUN mkdir -p ~/.cargo && \ + echo '[registries.crates-io]' > ~/.cargo/config && \ + echo 'protocol = "sparse"' >> ~/.cargo/config RUN apk add --no-cache libc-dev @@ -33,7 +37,7 @@ RUN rm ./target/release/deps/mastodon_bookmark_rss* && cargo build --release # Our production image starts here, which uses # the files from the builder image above. -FROM alpine:3.16 +FROM alpine:3.18 COPY --from=builder /app/target/release/mastodon-bookmark-rss /usr/local/bin/mastodon-bookmark-rss