Hello community,
It is my first experience with platform,
I am trying to run the simplest web service that returns hello world,
I’ve created a docker image for that
https://hub.docker.com/repository/docker/viktordzundza/web_api
there are two platform, linux/amd64 and arm64,
I’ve successfully run both of them with my local docker on mac m2
full Dockerfile listing is
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM node:latest as base
RUN npm install -g @moonrepo/cli
WORKDIR /app
COPY . .
RUN moon tools:docker-prepare
# get only needed files prepared by moon
FROM --platform=$BUILDPLATFORM rust:alpine as builder
RUN echo $BUILDPLATFORM
RUN apk add clang lld musl-dev gcc
WORKDIR /output
COPY --from=base ./app/.moon/docker/workspace .
COPY --from=base ./app/.moon/docker/sources .
RUN cd apps/web_api \
&& cargo build --release --target-dir bin
FROM --platform=$BUILDPLATFORM alpine
COPY --from=builder /output/apps/web_api/bin/release/web_api /web_api
COPY --from=builder /output/data/assets /assets
COPY --from=builder /output/apps/web_api/Rocket.toml /Rocket.toml
## Configure rocket to listen on all interfaces.
ENV ROCKET_ADDRESS=0.0.0.0
#
## Expose the port that the application listens on.
EXPOSE 10000
# What the container should run when it is started.
CMD /web_api
in the logs I see this error
exec /bin/sh: exec format error
What is wrong with my image?