I built the binary from outside container then copied to container by using a a simple Dockerfile.
# syntax=docker/dockerfile:1
FROM debian:12-slim
WORKDIR /app
COPY ./dist/app/my-app-bin ./
RUN /app/my-app-bin self restore
ENTRYPOINT ["/app/my-app-bin"]
But docker build failed with:
STEP 5/6: RUN /app/my-app-bin self restore
/bin/sh: 1: /app/my-app-bin: not found
Error: building at STEP "RUN /app/my-app-bin self restore": while running runtime: exit status 127
Exec to container to call bin directly:
root@9c0da96a3e1d:/app# /app/my-app-bin self restore
bash: /app/my-app-bin: cannot execute: required file not found
root@9c0da96a3e1d:/app# ls
my-app-bin
Is it the correct way to build docker container with pyapp? How can I make it work? Thanks.
I built the binary from outside container then copied to container by using a a simple Dockerfile.
But docker build failed with:
Exec to container to call bin directly:
Is it the correct way to build docker container with pyapp? How can I make it work? Thanks.