mv: cannot stat 'lin*': No such file or directory

Currently reading
mv: cannot stat 'lin*': No such file or directory

Operating system
  1. Windows
Mobile operating system
  1. Android
Last edited:
Hi All,

I am trying to build a container that ref's a local zip file but i can't seem to get around this error:

mv: cannot stat 'lin*': No such file or directory
The command '/bin/sh -c unzip -q && rm -rf && rm -rf __MACOSX && mv lin* /gunbot && rm -f /gunbot/config.js && rm -f /gunbot/tgconfig.json && rm -f /gunbot/autoconfig.json && chmod +x /gunbot/gunthy-linux' returned a non-zero code: 1

Here's my docker file - not sure why it can't find lin*
FROM bitnami/minideb:latest
ARG DEBIAN_FRONTEND=noninteractive
LABEL org.label-schema.vcs-ref=$VCS_REF org.label-schema.vcs-url=""

## Setup Enviroment
ENV TZ=Australia/Melbourne \
  TERM=xterm-256color \
  FORCE_COLOR=true \

## Setup pre-requisites
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get -y update && \
apt-get install -y apt-utils
## Install additional libraries and upgrade
RUN apt-get -y upgrade && \
apt-get install -y unzip curl fontconfig fonts-dejavu-extra && \
apt-get clean -y && \
apt-get autoclean -y && \
apt-get autoremove -y
RUN fc-cache -fv

## Install Gunbot
ADD /tmp/

RUN unzip -q \
&& rm -rf \
&& rm -rf __MACOSX \
&& mv lin* /gunbot \
&& rm -f /gunbot/config.js \
&& rm -f /gunbot/tgconfig.json \
&& rm -f /gunbot/autoconfig.json \
&& chmod +x /gunbot/gunthy-linux

WORKDIR /gunbot

VOLUME [ "/gunbot/backups", "/gunbot/logs", "/gunbot/json", "/gunbot/config.js", "/gunbot/gunbotgui.db"]
CMD /gunbot/gunthy-linux

-- post merged: --

i know this is something obvious - i'm a bit new to this :) thank you
Looks like the issue may be that it's spinning up 3 containers for this process

Step 10/16 : WORKDIR /tmp
 ---> Using cache
 ---> 652ca4a321a5
Step 11/16 : ADD /install/ /tmp/
 ---> Using cache
 ---> cc6859c2d56e
Step 12/16 : RUN unzip -q  && rm -rf  && rm -rf __MACOSX  && mv lin* /gunbot  && rm -f /gunbot/config.js  && rm -f /gunbot/tgconfig.json  && rm -f /gunbot/autoconfig.json  && chmod +x /gunbot/gunthy-linux
 ---> Running in aacb65d809ac
mv: cannot stat 'lin*': No such file or directory
The command '/bin/sh -c unzip -q  && rm -rf  && rm -rf __MACOSX  && mv lin* /gunbot  && rm -f /gunbot/config.js  && rm -f /gunbot/tgconfig.json  && rm -f /gunbot/autoconfig.json  && chmod +x /gunbot/gunthy-linux' returned a non-zero code: 1

So how can it share the tmp file?
from the logs it looks like it's copying over the zip but not to the tmp folder (added RUN ls -l)

Step 12/17 : RUN ls -l
---> Running in 0f71ea909729
total 118700
-rwxr-xr-x 1 root root 121548176 Feb 9 06:54
Removing intermediate container 0f71ea909729
Have spent most of today trying to fix this even with a mere who has some luck. Would greatly appreciate any help
Last edited:
You basicly took the Dockerfile of magicdude4eva/docker-gunbot and replaced the curl download in a RUN instruction with an ADD instruction and left the rest untouched. You can try if switching from ADD to COPY fixes your problem. COPY is a plain copy action from build context into the build container, while ADD does way more (see docs for the detailed difference). If you check all official images, you will see that almost noone uses the ADD instruction, as it is known to be a bag of surprises. The common approach for this is to curl zip's,extract and remove them in the same RUN instruction, as seperating the download and remove in seperate instructions, will make the zip remain in the image layer of the instruction (most instructions create their own layers!), but will be just "hidden" by the rm command in a later image layer. The 132mb for the zip won't free up in your case... kind of nasty, isn't it?

Appart of that it makes no sense that mv lin* /gunbot throws a stat error. should extract a folder called lin_v${number} in your workdir. Your context already is the workdir and you try to move lin* to another target.

I hope you checked out the git project with git or at least downloaded it as a zip instead of copy/pasting the content into a file. Copy/paste can lead to character and line encoding issues.
Last edited:
Thanks for the reply.

Yep those are the only changes except where it calls the URL in the Unzip
I have tried add and copy and many variations.

And yep I downloaded the zip

Sounds like I need to investigate curl to unzip as you stated.

Thanks very much
Curl archive, extract archive and remove archive in a single step is a usefull optimization.

Though, it should have worked with COPY or ADD instead of curl as well. Like I wrote: it makes no sense that it isn't working. Have you tried to use the absolut path instead, e.g. mv /tmp/lin_* /gunbot?
I tried mv /tmp/lin* /gunbot not with the _ tho! will do that today

checking ls on the container tho the zip file copies over but it's not going into the /tmp folder
(think) was't /tmp your workdir for the actions?

instead of:
ADD /tmp/


Also you can comment out the last RUN block and look around in the container where the file is actualy stored. Just start it like this:docker run -ti --rm --entrypoint /bin/bash ${yourcontainername}. Take a look in the folders, try the chained commands in the last RUN block and see what happens.
Last edited:
yeah /tmp was for the setup i guess. i just used what the original docker file author did

will try your suggestion above i don't think i tried that yet! thank you. i'll report back.
no luck with those suggestions but thanks! i havne't been able to troubleshoot the container yet. i don't have time so may give up on this for now. and just stick to getting the releases via the URL
So the zip file I've been trying to install only has a new exe on it . Not the full install. That's why it's not working.

So I need to update the exe that runs on the container itself I guess. Not really sure how to change it over .
my bad yes i did it's just a 'FILE"

I can get it to build succesfully. but for some reason it's building the exact same version.
i replaced the main file (gunthy-linux) in the zip with the newer version ( per their instructions) and re zipped. install that via local zip works now but it's not installing the latest one very odd.
Last edited:
That's kind of puzzling... When I downloaded and extracted a release zip, the expected folder was created and files have been in the expected subfolder. There must be reason why your experience is completly different. Can you share the exact download link of the zip you downloaded?

How do you identify that the latest version is not "installed"?
yep - i spend 5 hours on this today. it's driving me crazy. it's def the same version as it says so and is missing the feature the new one is meant to have.

it will be released officially in two weeks so i'll just wait til then. thanks for your help

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
Stop the container and then select it in the UI. Click the Edit button to change some of the container...
I can not install downloaded files for additional functionality in odoo In the docker I have got the...
Running it via CLI should run. Powershell command/script could work. Consult some links and methods...
  • Solved
I've changed the thread type. Now you can Mark as solution by clicking on this: Thank you.

Welcome to! is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!