redlib/Dockerfile

24 lines
569 B
Text
Raw Normal View History

2024-11-29 02:53:24 -08:00
FROM rust:1.71.0-alpine
2021-04-09 15:24:47 -07:00
2024-11-29 02:53:24 -08:00
# Install git and other necessary dependencies using apk
2024-11-29 01:16:28 -08:00
RUN apk update && apk add --no-cache git
2021-04-09 15:24:47 -07:00
2024-11-29 01:15:03 -08:00
# Set the working directory to /build
WORKDIR /build
2024-11-29 00:09:36 -08:00
# Clone the redlib repository
RUN git clone https://github.com/LucifersCircle/redlib.git /build
# Checkout the main branch
RUN cd /build && git checkout main
2024-11-29 00:09:36 -08:00
2024-11-29 01:15:03 -08:00
# Set the final image's default user
2023-12-26 18:25:52 -05:00
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
USER redlib
2021-04-09 15:24:47 -07:00
2024-11-29 01:15:03 -08:00
# Expose the necessary port
EXPOSE 8080
2021-04-09 15:24:47 -07:00
2024-11-29 01:15:03 -08:00
# Set the default command to run the application
CMD ["redlib"]