Skip to content

Commit

Permalink
upgrade rust and node in docker image, optimize buildtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Sep 7, 2023
1 parent c7cbc26 commit b140937
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
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 ./
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

Expand All @@ -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

Expand Down

0 comments on commit b140937

Please sign in to comment.