mirror of https://github.com/LemmyNet/lemmy
Fix entrypoint in Dockerfile (#4202)
* Fix entrypoint * Delete docker/builders/lemmy-builder-arm64/docker-build.sh * Delete docker/builders directory * Remove exception for builder * Remove publish_builder_arm64fix_report_and_app_order
parent
8a05c8f8be
commit
fc07ba2d3b
@ -1,9 +1,8 @@
|
||||
# build folders and similar which are not needed for the docker build
|
||||
target
|
||||
docker
|
||||
!docker/builders/lemmy-builder-arm64/docker-build.sh
|
||||
api_tests
|
||||
ansible
|
||||
tests
|
||||
*.sh
|
||||
pictrs
|
||||
pictrs
|
||||
|
@ -1,23 +0,0 @@
|
||||
ARG ARM_CROSS_TOOLCHAIN="ghcr.io/raskyld/aarch64-lemmy-linux-gnu:v0.1.0"
|
||||
|
||||
FROM ${ARM_CROSS_TOOLCHAIN}
|
||||
|
||||
# NB(raskyld): Please, do not hesitate to contact me through @raskyld@social.vivaldi.net (mastodon)
|
||||
# If you have any question about the cross-toolchain
|
||||
LABEL org.opencontainers.image.authors="Enzo Nocera <enzo@nocera.eu>"
|
||||
LABEL org.opencontainers.image.source="https://github.com/LemmyNet/lemmy"
|
||||
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later"
|
||||
LABEL org.opencontainers.image.description="A prebuilt lemmy server using a cross toolchain from amd64 to aarch64/arm64"
|
||||
|
||||
ARG CARGO_BUILD_FEATURES=default
|
||||
ARG RUST_RELEASE_MODE=debug
|
||||
|
||||
WORKDIR /home/lemmy/src
|
||||
USER 10001:10001
|
||||
|
||||
COPY --chown=lemmy:lemmy . ./
|
||||
|
||||
ENV RUST_RELEASE_MODE=${RUST_RELEASE_MODE} \
|
||||
CARGO_BUILD_FEATURES=${CARGO_BUILD_FEATURES}
|
||||
|
||||
RUN --mount=type=cache,target=./target,uid=10001,gid=10001 bash ./docker/builders/lemmy-builder-arm64/docker-build.sh
|
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e;
|
||||
|
||||
source "$HOME/.cargo/env"
|
||||
|
||||
case "$RUST_RELEASE_MODE" in
|
||||
"debug")
|
||||
echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
|
||||
cargo build --features "${CARGO_BUILD_FEATURES}"
|
||||
cp "./target/$CARGO_BUILD_TARGET/$RUST_RELEASE_MODE/lemmy_server" /home/lemmy/lemmy_server
|
||||
;;
|
||||
"release")
|
||||
# Pass a value to $USE_RELEASE_CACHE to avoid purging the cache for release builds
|
||||
[[ -z "$USE_RELEASE_CACHE" ]] || cargo clean --release
|
||||
echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
|
||||
cargo build --features "${CARGO_BUILD_FEATURES}" --release
|
||||
cp "./target/$CARGO_BUILD_TARGET/$RUST_RELEASE_MODE/lemmy_server" /home/lemmy/lemmy_server
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue