Git Product home page Git Product logo

Comments (9)

tetricky avatar tetricky commented on June 21, 2024 1

Right. That's made it click in my head.

I've mounted a local volume as /var/www/davis so that the data will persist - but in doing so whatever is in the container is now overwritten by an empty mount. I need to populate my local directory with whatever should be in the container (and it is in there still, but obscured by the mount).

Is it just the bin directory, or is there more in there?

Sorry for that, my mistake.

from davis.

tchapi avatar tchapi commented on June 21, 2024

Hi @tetricky

  • What folder are you trying the migrations from? How are you trying to do it?
  • I don't know podman but it seems like you're not replicating what is indicated in the readme, ie docker build --pull --file docker/Dockerfile --tag davis:latest . (notice the . at the end, indicating the current folder to operate in)

from davis.

tetricky avatar tetricky commented on June 21, 2024

....I've done that, and it builds....but using the locally built image, or the published image, and I'm still getting the same result:

# podman exec -it davis sh -c "APP_ENV=prod bin/console doctrine:migrations:migrate --no-interaction"
sh: bin/console: not found

In this respect podman is direct syntax compliant with docker.

I can use podman exec -it davis sh to access the container with an sh shell, plus I have used direct console access (using cockpit).

What I can't do is make bin/console be there....because it isn't. It's not installed on the image.

from davis.

tchapi avatar tchapi commented on June 21, 2024

It is perfectly installed (in the ghcr.io image, and locally when it's built correctly):

❯ docker run -d --name davis_test ghcr.io/tchapi/davis:v3.2.0
a677831b766f9d8db3430cf7db2b6d57e088f04c6ef60acf4b0d1c94a9ad277b
❯ docker exec -it davis_test sh -c "pwd"
/var/www/davis
❯ docker exec -it davis_test sh -c "ls -la bin/console"
-rwxr-xr-x    1 root     root          1293 Mar 12 22:46 bin/console
❯ docker exec -it davis_test sh -c "APP_ENV=prod bin/console --version"
Symfony 5.4.21 (env: prod, debug: false)

You have a problem in your podman installation. Try with docker directly; it seems your podman does not respect the WORKDIR directive: you can try to see what podman exec -it davis sh -c "pwd" gives you for instance.

from davis.

tetricky avatar tetricky commented on June 21, 2024

For various reasons I'm not able to use docker.

# podman exec -it davis sh -c "pwd"
/var/www/davis

I've pulled the image from ghcr.io, and had exactly the same problem. This is with the pulled image (v3.2.0):

# podman exec -it davis sh -c "pwd"
/var/www/davis
# podman exec -it davis sh -c "ls -la /bin/"
total 1252
drwxr-xr-x    1 root     root          4096 Feb 14 20:53 .
dr-xr-xr-x    1 root     root          4096 Apr 10 16:49 ..
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 arch -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 ash -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 base64 -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 bbconfig -> /bin/busybox
-rwxr-xr-x    1 root     root        841392 Nov 19 10:13 busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 cat -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 chattr -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 chgrp -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 chmod -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 chown -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 cp -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 date -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 dd -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 df -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 dmesg -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 dnsdomainname -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 dumpkmap -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 echo -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 ed -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 egrep -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 false -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 fatattr -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 fdflush -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 fgrep -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 fsync -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 getopt -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 grep -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 gunzip -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 gzip -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 hostname -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 ionice -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 iostat -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 ipcalc -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 kbd_mode -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 kill -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 link -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 linux32 -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 linux64 -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 ln -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 login -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 ls -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 lsattr -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 lzop -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 makemime -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 mkdir -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 mknod -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 mktemp -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 more -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 mount -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 mountpoint -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 mpstat -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 mv -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 netstat -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 nice -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 pidof -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 ping -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 ping6 -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 pipe_progress -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 printenv -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 ps -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 pwd -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 reformime -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 rev -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 rm -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 rmdir -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 run-parts -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 sed -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 setpriv -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 setserial -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 sh -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 sleep -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 stat -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 stty -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 su -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 sync -> /bin/busybox
-rwxr-xr-x    1 root     root        427648 Oct 24 13:54 tar
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 touch -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 true -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 umount -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 14 20:53 uname -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 usleep -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 watch -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Feb 10 16:45 zcat -> /bin/busybox

from davis.

tchapi avatar tchapi commented on June 21, 2024

The console executable is in /var/www/davis/bin, not /bin (watch out for the leading slash)

from davis.

tchapi avatar tchapi commented on June 21, 2024

The whole Davis application (ie. all PHP files, frontend, command line tools, etc) is in /var/www/davis so you don't want to mount anything else at this specific location in the container.

If you want to persist DAV files for instance, you can create a specific mount for that (example here where the files_webdav_volume: /webdav path is mounted and used in the env vars)

from davis.

tetricky avatar tetricky commented on June 21, 2024

Don't I need to also mount that in nginx for serving that directory?

I'm not seeing my way through this, in my setup.

from davis.

tchapi avatar tchapi commented on June 21, 2024

If it's DAV, you don't, because it's served via PHP-FPM to whatever proxy you're providing downstream. If you're mounting other static files for a specific use case that I'm not aware of, then mount them directly in your proxy container, it's easier.

from davis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.