Skip to content

Commit

Permalink
Switch Dockerfile from Alpine to Debian
Browse files Browse the repository at this point in the history
because of audiopus_sys bug (Lakelezz/audiopus_sys#9)
  • Loading branch information
LetUsFlow committed Feb 14, 2023
1 parent 114c395 commit c8cd6eb
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
FROM rust:1-alpine AS build
# Nightly is required until `-Z sparse-registry` is stabilized in Rust 1.68
# https://github.com/rust-lang/cargo/issues/9069#issuecomment-1408773982
FROM rustlang/rust:nightly-slim as build
# FROM rust:1-slim AS build
WORKDIR /app
COPY . /app

RUN apk add upx musl-dev pkgconf opus-dev
RUN cargo build --release && \
RUN apt-get update && \
apt-get install -y upx libopus-dev cmake
RUN cargo build --release -Z sparse-registry #&& \
upx --lzma --best /app/target/release/rusty-bruhbot

FROM alpine:latest
FROM debian:stable-slim
WORKDIR /app

RUN apk add ffmpeg && \
rm -fr /var/cache/apk/*
RUN apt-get update && \
apt-get install -y ffmpeg

COPY --from=build /app/target/release/rusty-bruhbot /app/rusty-bruhbot

Expand Down

0 comments on commit c8cd6eb

Please sign in to comment.