From: Dessalines Date: Tue, 27 Oct 2020 15:57:40 +0000 (-0500) Subject: Fixing cache dev dockerfile X-Git-Url: http://these/git/%7B%60/feeds/inbox/static/%7BpictrsAvatarThumbnail%28user.avatar%29%7D?a=commitdiff_plain;h=77b17c67378c6d144913b82b02ea8f0e7df0efd7;p=lemmy.git Fixing cache dev dockerfile --- diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index 69af5653..d10e7263 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -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"]