How to download file and run after that

My Dockerfile

FROM aarch64/alpine:latest
RUN apk add --no-cache --update curl git gcc build-base alpine-sdk
RUN curl -LJO https://playit.gg/downloads/playit-aarch64-0.4.6
#RUN cp playit-aarch64-0.4.6 /

#COPY playit-aarch64-0.4.6 /
RUN chmod a+x /playit-aarch64-0.4.6

#CMD ls
CMD ./playit-aarch64-0.4.6

Log afrer run Dockerfile

/bin/sh: ./playit-aarch64-0.4.6: not found

what wrong in my Dockerfile

So, what did that give you?

Note that you use an absolute path here:

RUN chmod a+x /playit-aarch64-0.4.6

…but then a relative path here:

CMD ./playit-aarch64-0.4.6

I don’t know what the default working folder is; be explicit using WORKDIR.

Also, note that CMD is not meant to RUN commands to create your image. Instead, it’s used to start the container. That may very well be what you want, but that’s not clear to me. Many images define an entrypoint for that (for which CMD then defines the default arguments). But true, CMD can be used too. Be sure to read its documentation to determine if you indeed want to use “the shell form” for your downloaded thing:

If you use the shell form of the CMD, then the <command> will execute in /bin/sh -c

boyphongsakorn/playitgg-docker (github.com) My Github

I deleted and not use curl
i download it(playit-aarch64-0.4.6) to my project
code after edit

FROM aarch64/alpine:latest
WORKDIR '/app'
COPY playit-aarch64-0.4.6 ./
COPY . .
RUN chmod a+x ./playit-aarch64-0.4.6
CMD ./playit-aarch64-0.4.6

error after that

/bin/sh: ./playit-aarch64-0.4.6: not found

error when i remove chmod a+x ./playit-aarch64-0.4.6

/bin/sh: ./playit-aarch64-0.4.6: Permission denied

I had a similar issue with alpine. It turned out the error message was not “talking about” the executable but the libraries it used. Are you sure playit compatible with alpine? Have you tried it with a debian based system (or any other)?

i’m not sure playit compatible with alpine or not
but this time is work
i use ubuntu and install ca-ce something name i forget