I wish I had the time to dive a bit more into this, but perhaps I
can give some pointers.
If you want to change the source, you'd better use the docker
development setup as explained in this
doc. To use production setup to develop is not very handy,
because it's tuned for production use. The development setup (with
docker-compose as explained) will also use a compatible version of
redis as a docker container.
Docker containers are kind of readonly (you can modify it while
it's running, but all changes are lost when you start it again -
this is intentional, for reproducability). So if you want to make
changes, you'd generally create a new docker project with a
Dockerfile, starting from the image you want to base yours on
(foodcoops/foodsoft), then each command in the Dockerfile will be
stored as a 'layer' of changes on top of the previous. That's how
you make changes persistent (like foodcoops.net's
foodsoft setup, or that
If you just want to get foodsoft up and running with docker, I'd
advise to run stock redis:3.2-alpine in a docker container. That
avoids you having to change the Foodsoft image.
Hope this helps a bit.
On 05-05-19 22:22, noid [via foodsoft]
Ok I'm sorry as I'm a beginner in docker, but I really need help
I managed to guess one must change the Gemfile of foodsoft itself
to fix the issue concerning latest version of redis. Nevertheless
the non-running foodsoft container is not accessible with docker
exec or any other method I found. I guess one must use -v argument
while running the container to change the Gemfile "on the fly",
but I ended up with this while trying :
Bundler::ProductionError: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the /usr/src/app/Gemfile freeze
by running `bundle install --no-deployment`.
The list of sources changed
The dependencies in your gemfile changed
You have added to the Gemfile:
* source: https://github.com/carchrae/localize_input.git (at master)
* redis (~> 3.3)
* hashie (~> 3.4.6)
You have deleted from the Gemfile:
* source: https://github.com/bennibu/localize_input.git (at master@5eb188d)
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.6/lib/bundler/setup.rb:20:in `<top (required)>'
I have two problems here :
1. I don't know how I can run bundle install inside a non-running
container. I doubt it is possible.
2. I didn't delete anything from the Gemfile, only added 'redis
(~> 3.3)'. I double checked this. So why does the output say I
deleted all that lines ?