2020-06-16 11:35:26 +00:00
|
|
|
FROM ekidd/rust-musl-builder:1.42.0-openssl11
|
2020-01-02 23:28:43 +00:00
|
|
|
|
2020-02-29 17:38:47 +00:00
|
|
|
USER root
|
|
|
|
RUN mkdir /app/dist/documentation/ -p \
|
|
|
|
&& addgroup --gid 1001 lemmy \
|
2020-07-01 12:54:29 +00:00
|
|
|
&& adduser --gecos "" --disabled-password --shell /bin/sh -u 1001 --ingroup lemmy lemmy
|
2020-02-29 17:38:47 +00:00
|
|
|
|
2020-01-02 23:28:43 +00:00
|
|
|
# Copy resources
|
|
|
|
COPY server/config/defaults.hjson /app/config/defaults.hjson
|
|
|
|
COPY ui/dist /app/dist
|
2020-02-29 17:38:47 +00:00
|
|
|
COPY server/target/debug/lemmy_server /app/lemmy
|
2020-01-02 23:28:43 +00:00
|
|
|
|
|
|
|
RUN chown lemmy:lemmy /app/ -R
|
|
|
|
USER lemmy
|
|
|
|
EXPOSE 8536
|
|
|
|
WORKDIR /app
|
|
|
|
CMD ["/app/lemmy"]
|