]> Untitled Git - lemmy.git/blobdiff - docker/prod/Dockerfile.arm
For untagged commits, include hash in version name (fixes #1563)
[lemmy.git] / docker / prod / Dockerfile.arm
index 675b19bf57f81c9cd9ce0ac79e73a6539ee3b5ba..01f24456e239d3a54a306c31f7508d734b2c6d0f 100644 (file)
@@ -1,4 +1,4 @@
-ARG RUST_BUILDER_IMAGE=rust:1.47-slim-buster
+ARG RUST_BUILDER_IMAGE=rust:1.50-slim-buster
 
 # Build Lemmy
 FROM $RUST_BUILDER_IMAGE as builder
@@ -11,6 +11,7 @@ RUN apt-get update \
 WORKDIR /app
 
 COPY ./ ./
+RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
 
 RUN cargo build --release
 
@@ -19,28 +20,19 @@ RUN strip ./target/release/lemmy_server
 
 RUN cp ./target/release/lemmy_server /app/lemmy_server
 
-# Build the docs
-FROM $RUST_BUILDER_IMAGE as docs
-WORKDIR /app
-RUN cargo install --debug mdbook
-COPY docs ./docs
-RUN mdbook build docs/
-
 # The Debian runner
 FROM debian:buster-slim as lemmy
 
-# Install libpq for postgres and espeak for captchas
+# Install libpq for postgres
 RUN apt-get update \
- && apt-get -y install --no-install-recommends espeak postgresql-client libc6 libssl1.1 \
+ && apt-get -y install --no-install-recommends postgresql-client libc6 libssl1.1 \
  && rm -rf /var/lib/apt/lists/*
 
 RUN addgroup --gid 1000 lemmy
 RUN adduser --no-create-home --shell /bin/sh --uid 1000 --gid 1000 lemmy
 
 # Copy resources
-COPY --chown=lemmy:lemmy config/defaults.hjson /config/defaults.hjson
 COPY --chown=lemmy:lemmy --from=builder /app/lemmy_server /app/lemmy
-COPY --chown=lemmy:lemmy --from=docs /app/docs/book/ /app/documentation/
 
 RUN chown lemmy:lemmy /app/lemmy
 USER lemmy