Skip to content

Commit

Permalink
fart fart fart
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Oct 20, 2024
1 parent db0b60c commit dee37a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:21-alpine3.18 as frontend-builder
FROM node:21-alpine3.20 AS frontend-builder

WORKDIR /app
COPY package-lock.json package.json buildscript.js ./
COPY src ./src/
RUN npm ci
RUN npm run build

FROM rust:1.72-alpine3.18 as builder
FROM rust:1.82-alpine3.20 AS builder

RUN mkdir -p ~/.cargo && \
echo '[registries.crates-io]' > ~/.cargo/config && \
Expand All @@ -26,14 +26,15 @@ WORKDIR /app
COPY Cargo.toml .
COPY Cargo.lock .
RUN cargo build --release && rm -rf src/
RUN strip target/release/mastodon-list-bot

# Copy the source code and run the build again.
# This should only compile the app itself as the
# dependencies were already built above.
COPY . ./
COPY --from=frontend-builder /app/build/ /app/build/
COPY --from=frontend-builder /app/node_modules/ /app/node_modules/
RUN rm ./target/release/deps/mastodon_list_bot* && cargo build --release
RUN strip target/release/mastodon-list-bot

# Our production image starts here, which uses
# the files from the builder image above.
Expand Down

0 comments on commit dee37a2

Please sign in to comment.