[TriLUG] Docker issue
Brian McCullough via TriLUG
trilug at trilug.org
Fri Sep 17 00:20:11 EDT 2021
On Thu, Sep 16, 2021 at 10:31:57PM -0400, Mauricio Tavares wrote:
> On Thu, Sep 16, 2021 at 4:15 PM Brian McCullough via TriLUG
> <trilug at trilug.org> wrote:
> >
> > Folks,
> >
> > All of the containers appear to rebuild when I do "build --no-cache",
> > except the DB container.
> >
> Is the database always created/populated when container is built
> or it is stored in a separate volume that is then connected at
> runtime?
Thank you, Mauricio.
Since I wrote this, I have tried a few things, including destroying the
whole "/var/lib/docker/container-xxx-db/" directory path. After I did
that, I got complaints about not being able to re-create things and
discovered that everything there was owned by root. I changed ownership
to myself, since I was the one running the docker command.
Things appear to have been re-created properly, except....
> > I also tried "rm db" but that didn't seem to do any more than re-build,
> > which just seems to reload the SQL scripts. Unfortunately, MySQL is
> > complaining ( logs db ) that the ( one of the ) database files is
> > corrupt.
> >
> I take that means a DB rebuild relies on these SQL scripts to
> populate it. Are said scripts run from a Dockerfile or a script (like
> entrypoint)? If I were in your shoes, I would disable the running of
> said scripts, then build and run DB container, and then run each SQL
> script manually to find out where it goes boink (and figure out if it
> is a docker or a script issue).
Originally, the physical MySQL file was apparently corrupted, but since
destroying everything, things are much better. B-)
The scripts reside inside the source code ( web stuff, PHP ) that is
trying to run in the Apache container, which depends on the database.
At this point, I suspect that I am trying to run off the wrong branch,
one that is incompatible with the Docker setup, so I will be
investigating that further. The most obvious evidence of that, to me,
is that the log is complaining about missing tables and columns, so I
think that the "initialization scripts" are not quite right.
Thanks again,
Brian
More information about the TriLUG
mailing list