# Development setup with Docker: errors

**URL:** <https://forum.foodcoops.net/t/development-setup-with-docker-errors/614>\
**Category:** Foodsoft Developement\
**Created:** [April 30, 2023, 1:52am UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614 "2023-04-30T01:52:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![twothreenine](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/twothreenine/32/36_2.png) [@twothreenine](https://forum.foodcoops.net/u/twothreenine)\
**Post date:** [April 30, 2023, 1:52am UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/1 "2023-04-30T01:52:51Z")

</div>

I just tried to [get Foodsoft running locally via Docker](https://github.com/foodcoops/foodsoft/blob/master/doc/SETUP_DEVELOPMENT_DOCKER.md#prerequisites-windows-only) (Ubuntu) and ran into the following problems:

- `docker-compose -f docker-compose-dev.yml up -d mariadb`  
led to the error `docker.errors.DockerException: Install paramiko package to enable ssh:// support`  
I noticed that this is a problem with compose v1 (I was using docker-compose version 1.29.2) and tried compose v2, replacing “docker-compose” with “docker compose”. Then the first command worked.
- `docker compose -f docker-compose-dev.yml run --rm foodsoft bundle install`  
Again using compose v2, I got the following error:  
`Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "./docker-entrypoint.sh": stat ./docker-entrypoint.sh: no such file or directory: unknown`  
I was using shell in the Foodsoft directory.  
How should I solve this?

---

<div class="post-metadata">

**Author:** ![steffen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/steffen/32/35_2.png) [@steffen](https://forum.foodcoops.net/u/steffen)\
**Post date:** [April 30, 2023, 8:27am UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/2 "2023-04-30T08:27:23Z")

</div>

Tested with `docker-compose` 1.29.2 I have no such problems on Debian bullseye.

Maybe it’s to obvious: does `docker-entrypoint.sh` exists in the same path you’re running `docker-compose`?

---

<div class="post-metadata">

**Author:** ![twothreenine](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/twothreenine/32/36_2.png) [@twothreenine](https://forum.foodcoops.net/u/twothreenine)\
**Post date:** [April 30, 2023, 11:33am UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/3 "2023-04-30T11:33:34Z")

</div>

> [@steffen](#):
>
> Maybe it’s to obvious: does `docker-entrypoint.sh` exists in the same path you’re running `docker-compose`?

Yes, as I wrote I was running it in the Foodsoft path where the docker-entrypoint.sh was as well.  
But note: I did not run `docker-compose` but `docker compose` (v2) because of the problem I mentioned above.

---

<div class="post-metadata">

**Author:** ![yksflip](https://forum.foodcoops.net/letter_avatar_proxy/v4/letter/y/58f4c7/32.png) [@yksflip](https://forum.foodcoops.net/u/yksflip)\
**Post date:** [May 10, 2023, 10:11am UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/4 "2023-05-10T10:11:35Z")

</div>

did the docker context stuff we’ve talked about work you? 🙂  
making docker-compose v2 work could be another issue for the tracker …

---

<div class="post-metadata">

**Author:** ![twothreenine](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/twothreenine/32/36_2.png) [@twothreenine](https://forum.foodcoops.net/u/twothreenine)\
**Post date:** [February 3, 2024, 10:27am UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/5 "2024-02-03T10:27:26Z")

</div>

I tried to install Foodsoft via Docker on Windows 10 now since using Linux is too inconvenient for me. I followed the [setup instructions for docker](https://github.com/foodcoops/foodsoft/blob/master/doc/SETUP_DEVELOPMENT_DOCKER.md) but came along some issues, probably because I have `docker compose v2.24.3-desktop.1` installed. I don’t want to replace it with the out-of-date docker-compose v1 (you would you solve this? environments?) so I tried to find a solution with v2:

```auto
docker-compose -f docker-compose-dev.yml run --rm foodsoft \
  bundle install

```

lead to the error:

```auto
exec ./docker-entrypoint.sh: no such file or directory

```

In the [compose v2 docs](https://docs.docker.com/compose/migrate/) I found the tip to use `--compatibilty`, so I ran:

```auto
docker compose --compatibility -f docker-compose-dev.yml run --rm foodsoft bundle install

```

Now it seemed to work. Same for the following command (setup\_development\_docker).

Then I ran:

```auto
docker compose --compatibility -f docker-compose-dev.yml up

```

and came across the error:

```auto
foodsoft_worker_1 | ./docker-entrypoint.sh: 26: exec: ./proc-start: not found

```

The `docker-entrypoint.sh` file definitely exists in the root folder.

What would you suggest?

---

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [February 3, 2024, 11:18am UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/6 "2024-02-03T11:18:50Z")

</div>

Thanks for your the list of things you tried, good to know it doesn’t work anymore with Docker Desktop. It seems the worker container cannot find the file proc-start (but it can file docker-entrypoint.sh). That is a little odd.

You might try replacing `./proc-start worker` with `QUEUE=* bundle exec rake resque:work` (or even move the `QUEUE` setting to the `env` section) in `docker-compose-dev.yml` - just as something to try.

An alternative approach is to install the docker daemon in WSL2, then you don’t need Docker Desktop (e.g. with [this guide](https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop)). But eventually I think it would be useful to have Foodsoft working out of the box with Docker Desktop as well.

There seems to be a number of small but perhaps relevant differences [migrating from docker compose 1 to 2](https://docs.docker.com/compose/migrate/) (same link you mentioned), including in the behaviour of environment variables. But that does not seem to be the issue you experience.

It’s really odd that the entry point can be found, but proc-start not.

---

<div class="post-metadata">

**Author:** ![twothreenine](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/twothreenine/32/36_2.png) [@twothreenine](https://forum.foodcoops.net/u/twothreenine)\
**Post date:** [February 3, 2024, 10:33pm UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/7 "2024-02-03T22:33:14Z")

</div>

> [@wvengen](#):
>
> You might try replacing `./proc-start worker` with `QUEUE=* bundle exec rake resque:work` […] in `docker-compose-dev.yml`

This gives me:

```auto
foodsoft_worker_1 | ./docker-entrypoint.sh: 26: exec: QUEUE=*: not found
[...]
foodsoft_worker_1 exited with code 127

```

and:

```auto
foodsoft_1 | ./docker-entrypoint.sh: 26: exec: ./proc-start: not found
[...]
foodsoft_1 exited with code 127

```

(perhaps I overlooked this second hint earlier)

btw when I try to run the container from the Docker Desktop GUI, I get:

```auto
(HTTP code 400) unexpected - failed to create task for container: 
failed to create shim task: OCI runtime create failed: runc create failed: 
unable to start container process: exec: "./docker-entrypoint.sh": 
stat ./docker-entrypoint.sh: no such file or directory: unknown

```

> [@wvengen](#):
>
> An alternative approach is to install the docker daemon in WSL2, then you don’t need Docker Desktop (e.g. with [this guide](https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop)).

Ok but I still might need to switch to compose v1 and that’s a problem since I might need v2 in WSL for another project. How do you solve this? Is it possible to have both at the same time? Or by using a virtual environment?

---

<div class="post-metadata">

**Author:** ![twothreenine](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/twothreenine/32/36_2.png) [@twothreenine](https://forum.foodcoops.net/u/twothreenine)\
**Post date:** [February 5, 2024, 1:30pm UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/8 "2024-02-05T13:30:23Z")

</div>

I tried it with WSL2 now (without Docker) and failed here:

> foodsoft$ rbenv exec rails foodsoft:setup\_development  
> rbenv: rails: command not found

Minor notes up to that point:

> [@](#):
>
> **System requirements** : [rbenv](https://github.com/rbenv/rbenv), [Ruby 2.7+](https://www.ruby-lang.org/en/downloads/), [Bundler](http://bundler.io/), [MySQL](http://mysql.com/) / [SQLite](http://sqlite.org/), [Redis](http://redis.io/) (optional).

This sounds like you’d need to have these installed for the next steps, however, the following steps include the installation of them.

> [@](#):
>
> rbenv exec gem install bundler

This line should be updated, since I got:

```auto
Fetching bundler-2.5.5.gem
ERROR: Error installing bundler:
        The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
        bundler requires Ruby version >= 3.0.0. The current ruby version is 2.7.8.225.

```

> [@twothreenine](#):
>
> Ok but I still might need to switch to compose v1 and that’s a problem since I might need v2 in WSL for another project. How do you solve this? Is it possible to have both at the same time? Or by using a virtual environment?

btw I forgot that I don’t need Docker if I use WSL in the first place. Also I found [this tutorial](https://endjin.com/blog/2021/11/setting-up-multiple-wsl-distribution-instances) in case I should need WSL with a different Ruby version for example (perhaps someone might need this)

---

<div class="post-metadata">

**Author:** ![twothreenine](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/twothreenine/32/36_2.png) [@twothreenine](https://forum.foodcoops.net/u/twothreenine)\
**Post date:** [March 2, 2024, 3:03pm UTC](https://forum.foodcoops.net/t/development-setup-with-docker-errors/614/9 "2024-03-02T15:03:42Z")

</div>

Update: @lentschi helped me and it’s working now on my computer via Windows/Docker, both for upstream as for our hackathon fork.

The main issue seems to be that I hadn’t understood what a “clean checkout” ([Windows prerequisite](https://github.com/foodcoops/foodsoft/blob/master/doc/SETUP_DEVELOPMENT_DOCKER.md#prerequisites-windows-only)) was. I assumed it meant something with _git checkout_, while it means you have to clone the repo after that command. I’d suggest to update this terminology in the instructions to make it more beginner-friendly.

Docker compose (v2) _is_ supported! Only the instructions still assume that you’re using v1. I’d suggest changing the instructions to the v2 command (`docker compose` instead of `docker-compose`) and either adding a note for v1 users or legacy instructions, since it’s tedious and confusing to always having to replace the `-` with a space. (of course, the requirements have to be updated as well)

@yksflip We’ve come across a bug with the seeds and active record which I described in [an issue](https://github.com/foodcoops/foodsoft/issues/1049).
