Update Dockerfile
parent
0c73046101
commit
c33d1ea2ce
28
Dockerfile
28
Dockerfile
|
@ -12,10 +12,8 @@ COPY . .
|
||||||
RUN rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
|
RUN rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
# Remove `--features=stats` if you want to deploy without stats collection
|
# Remove `--features=stats` if you want to deploy without stats collection
|
||||||
#RUN cargo build --features=stats --release \
|
RUN cargo build --features=stats --release \
|
||||||
# --target=x86_64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu
|
--target=x86_64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
RUN echo woah
|
|
||||||
|
|
||||||
# Runtime
|
# Runtime
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
|
@ -25,22 +23,22 @@ ENV TARGETPLATFORM=$TARGETPLATFORM
|
||||||
|
|
||||||
# Add extra runtime dependencies here
|
# Add extra runtime dependencies here
|
||||||
# RUN apt-get update && apt-get install -yqq --no-install-recommends \
|
# RUN apt-get update && apt-get install -yqq --no-install-recommends \
|
||||||
# openssl ca-certificates && rm -rf /var/lib/apt/lists/*
|
# openssl ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy spoticord binaries from builder to /tmp
|
# Copy spoticord binaries from builder to /tmp
|
||||||
#COPY --from=builder \
|
COPY --from=builder \
|
||||||
# /app/target/x86_64-unknown-linux-gnu/release/spoticord /tmp/x86_64
|
/app/target/x86_64-unknown-linux-gnu/release/spoticord /tmp/x86_64
|
||||||
#COPY --from=builder \
|
COPY --from=builder \
|
||||||
# /app/target/aarch64-unknown-linux-gnu/release/spoticord /tmp/aarch64
|
/app/target/aarch64-unknown-linux-gnu/release/spoticord /tmp/aarch64
|
||||||
|
|
||||||
# Copy appropiate binary for target arch from /tmp
|
# Copy appropiate binary for target arch from /tmp
|
||||||
#RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
# cp /tmp/x86_64 /usr/local/bin/spoticord; \
|
cp /tmp/x86_64 /usr/local/bin/spoticord; \
|
||||||
# elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
# cp /tmp/aarch64 /usr/local/bin/spoticord; \
|
cp /tmp/aarch64 /usr/local/bin/spoticord; \
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
# Delete unused binaries
|
# Delete unused binaries
|
||||||
# RUN rm -rvf /tmp/x86_64 /tmp/aarch64
|
RUN rm -rvf /tmp/x86_64 /tmp/aarch64
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/bin/spoticord" ]
|
ENTRYPOINT [ "/usr/local/bin/spoticord" ]
|
||||||
|
|
Loading…
Reference in New Issue