mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 12:21:18 +00:00
Fixing cache dev dockerfile
This commit is contained in:
parent
91d073c2e8
commit
77b17c6737
1 changed files with 6 additions and 13 deletions
|
@ -6,7 +6,7 @@ ENV HOME=/home/root
|
|||
WORKDIR /app
|
||||
|
||||
# Copy the source folders
|
||||
COPY . .
|
||||
COPY . ./
|
||||
|
||||
# Build for debug
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
|
@ -15,28 +15,21 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
|||
RUN --mount=type=cache,target=/app/target \
|
||||
cp target/debug/lemmy_server lemmy_server
|
||||
|
||||
FROM ekidd/rust-musl-builder:1.47.0 as docs
|
||||
FROM peaceiris/mdbook:v0.3.7 as docs
|
||||
WORKDIR /app
|
||||
COPY docs ./docs
|
||||
RUN sudo chown -R rust:rust .
|
||||
RUN mdbook build docs/
|
||||
|
||||
FROM alpine:3.12
|
||||
FROM ubuntu:20.10
|
||||
|
||||
# Install libpq for postgres
|
||||
RUN apk add libpq
|
||||
|
||||
# Install Espeak for captchas
|
||||
RUN apk add espeak
|
||||
# Install libpq for postgres and espeak
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y libpq-dev espeak
|
||||
|
||||
# Copy resources
|
||||
COPY config/defaults.hjson /config/defaults.hjson
|
||||
COPY --from=rust /app/lemmy_server /app/lemmy
|
||||
COPY --from=docs /app/docs/book/ /app/documentation/
|
||||
|
||||
RUN addgroup -g 1000 lemmy
|
||||
RUN adduser -D -s /bin/sh -u 1000 -G lemmy lemmy
|
||||
RUN chown lemmy:lemmy /app/lemmy
|
||||
USER lemmy
|
||||
EXPOSE 8536
|
||||
CMD ["/app/lemmy"]
|
||||
|
|
Loading…
Reference in a new issue