mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-18 21:36:56 -04:00
added Dockerfile for sdserver
This commit is contained in:
@@ -1,7 +1,28 @@
|
||||
FROM gcr.io/distroless/cc
|
||||
FROM debian:stable-slim
|
||||
|
||||
# Arguments and labels
|
||||
ARG USER=spaceboy
|
||||
LABEL org.opencontainers.image.title="Spacedrive Server"
|
||||
LABEL org.opencontainers.image.source="https://github.com/spacedriveapp/spacedrive"
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y libavdevice-dev libavfilter-dev libavformat-dev libavcodec-dev libavutil-dev
|
||||
|
||||
# Copy the compiled server CLI into the container
|
||||
COPY ./server /sdserver
|
||||
|
||||
# Expose webserver
|
||||
EXPOSE 8080
|
||||
|
||||
# Create the data directory to store the database
|
||||
RUN mkdir /data
|
||||
ENV DATA_DIR /data
|
||||
|
||||
# Drop privledges to non-root user
|
||||
RUN adduser --system --no-create-home --shell /usr/sbin/nologin $USER && \
|
||||
chown -R $USER /data && \
|
||||
chmod -R 770 /data
|
||||
USER $USER
|
||||
|
||||
# Run the CLI when the container is started
|
||||
ENTRYPOINT [ "/sdserver" ]
|
||||
|
||||
Reference in New Issue
Block a user