mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-23 23:27:57 +01:00
fix merge fuckup with Dockerfile
This commit is contained in:
parent
96e2928939
commit
fe2fca970d
18
Dockerfile
18
Dockerfile
@ -1,14 +1,16 @@
|
|||||||
# Setup build image for multistage build
|
FROM --platform=$BUILDPLATFORM alpine:latest as copy
|
||||||
FROM rust:bullseye as builder
|
ARG TARGETPLATFORM
|
||||||
# install build deps
|
RUN case "$TARGETPLATFORM" in \
|
||||||
RUN apt-get update && apt-get upgrade -y
|
"linux/arm/v7") echo armv7-unknown-linux-gnueabihf > /rust_target.txt ;; \
|
||||||
RUN apt-get install -yqq --no-install-recommends capnproto python3 python3-pip
|
"linux/arm/v6") echo arm-unknown-linux-gnueabihf > /rust_target.txt ;; \
|
||||||
RUN pip3 install paho-mqtt
|
"linux/arm64") echo aarch64-unknown-linux-gnu > /rust_target.txt ;; \
|
||||||
|
"linux/amd64") echo x86_64-unknown-linux-gnu > /rust_target.txt ;; \
|
||||||
|
*) exit 1 ;; \
|
||||||
|
esac
|
||||||
|
|
||||||
WORKDIR /usr/src/bffh
|
WORKDIR /usr/src/bffh
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cargo build --release
|
RUN cp target/$(cat /rust_target.txt)/release/bffhd ./bffhd.bin
|
||||||
|
|
||||||
|
|
||||||
# Setup deployable image
|
# Setup deployable image
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
Loading…
Reference in New Issue
Block a user