Closed abeoliver closed 1 year ago
This is a very interesting error. (The warning on the first line is harmless, you can ignore it.)
I have a feeling that Lima's sshfs might be the culprit here. Possibly the files on your host were not fully synced into the VM?
/Users/username/git/docker-elk/
populated?file elasticsearch/elasticsearch.yml
return inside that directory?I am not convinced of that theory myself, because the Compose file is obviously there, and you are able to build images that include the config files.
What is the guest OS inside the Lima VM?
Thanks @antoineco for getting back to me so quickly!
The only file in /Users/username/
was Library/Caches/colima/
. This does suggest that something is not being mounted correctly but, as you mentioned, I am still able to do other tasks that should also require a mounted fs. I understand if you believe that this is out of scope but I appreciate your help nonetheless.
In some more testing I found that:
./elasticsearch/config
to a random directory instead of mounting ./elasticsearch/config/elasticsearch.yml
to /usr/share/elasticsearch/config/elasticsearch.yml
, the error goes away./elasticsearch/config
to /usr/share/elasticsearch/config
(which i realize would break things later), the error goes away/tmp/a.yml
in the Dockerfile and mount ./elasticsearch/config/elasticsearch.yml
to /tmp/a.yml
, the error persistsHere is my lima VM info:
❯ colima ssh
colima:~$ uname -a
Linux colima 5.15.68-0-virt #1-Alpine SMP Fri, 16 Sep 2022 06:29:31 +0000 aarch64 Linux
colima:~$ cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.16.2
PRETTY_NAME="Alpine Linux v3.16"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
BUILD_ID=""
VARIANT_ID="clm"
The only file in
/Users/username/
wasLibrary/Caches/colima/
. This does suggest that something is not being mounted correctly
Ah, there you go! Mounting files inside containers requires them to be present on the Docker host. Copying files into images, on the other hand, is done by copying the build context over a client-server communication, which is why this approach worked for you.
I've had a very good experience working with Lima myself, also for working with containers. I don't know what Colima is adding on top, but adding a mount for your home directory to your Lima definition should allow you to resolve this situation.
Yes, that fixes it! It seems as though I had some non-standard mounts from an old project left behind. Thank you for your help!!
Problem description
I cloned the git repo from main to a folder in my home directory. I ran
docker compose build
and it worked with no errors. However, when I rundocker compose up setup
, I receive the following error:Extra information
Attempts to solve:
However, I was able to achieve success in building and running the stack with a workaround. If I remove all of the volume mounts (except for the elasticsearch data volume created by docker-compose.yaml:52/113) and use COPY statements in each Dockerfile to transfer the configuration files to each container, the stack starts up with no issues. Note: required 3cpu/6gb memory on colima because 2cpu/4gb was causing issues.
Stack configuration
No changes to the repo. Running Colima (v0.5.5) on an ARM M1 Macbook (MacOs 13.4.1).
Docker setup
Container logs