This repository has been archived by the owner on Oct 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a370d4f
commit b4d5aba
Showing
6 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
FROM rust:1 | ||
ADD . /root | ||
WORKDIR /root | ||
FROM alpine:3.14 | ||
ADD . /app | ||
WORKDIR /app | ||
RUN apk update | ||
RUN apk add rust cargo openssl-dev | ||
RUN cargo build --release | ||
|
||
FROM ubuntu:bionic | ||
FROM alpine:3.14 | ||
EXPOSE 8080 | ||
RUN groupadd -r radiobrowser && \ | ||
useradd --no-log-init -r -g radiobrowser radiobrowser && \ | ||
apt-get update && \ | ||
apt-get install -y libssl1.1 ca-certificates && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
mkdir -p /usr/lib/radiobrowser/static/ && \ | ||
COPY --from=0 /app/target/release/radiobrowser-api-rust /usr/bin/ | ||
COPY --from=0 /app/static/ /usr/lib/radiobrowser/static/ | ||
COPY --from=0 /app/etc/config-example.toml /etc/radiobrowser.toml | ||
RUN addgroup -S radiobrowser && \ | ||
adduser -S -G radiobrowser radiobrowser && \ | ||
apk add libgcc && \ | ||
mkdir -p /var/log/radiobrowser/ && \ | ||
chown -R radiobrowser:radiobrowser /var/log/radiobrowser/ | ||
COPY --from=0 /root/target/release/radiobrowser-api-rust /usr/bin/ | ||
COPY --from=0 /root/static/ /usr/lib/radiobrowser/static/ | ||
COPY --from=0 /root/etc/config-example.toml /etc/radiobrowser.toml | ||
chown -R radiobrowser:radiobrowser /var/log/radiobrowser/ && \ | ||
chmod go+r /etc/radiobrowser.toml | ||
ENV STATIC_FILES_DIR=/usr/lib/radiobrowser/static/ | ||
USER radiobrowser:radiobrowser | ||
CMD [ "radiobrowser-api-rust", "-f", "/etc/radiobrowser.toml"] | ||
CMD [ "radiobrowser-api-rust", "-f", "/etc/radiobrowser.toml", "-vvv"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters