Giter Club home page Giter Club logo

Comments (7)

tianon avatar tianon commented on August 16, 2024

I think the problem is that you're setting the container's HOME environment variable to /home/hostusername/docker-mutt/gmailaccountuser (which is the path on your host), but that path doesn't exist inside the container. I think you want to set that to /home/user instead.

from dockerfiles.

hub20xx avatar hub20xx commented on August 16, 2024

Thank you @tianon ! I modified the command so now it is like this:

docker run -it --rm \
    -e TERM \
    -e [email protected] \
    -e GMAIL_NAME='gmailaccount user' \
    -u "$(id -u):$(id -g)" \
    -e HOME=/home/user \
    -v "$HOME/.signature:/home/user/.signature" \
    -v "$HOME/.muttrc:/home/user/.muttrc.local" \
    -v "$HOME/.mutt/cache:/home/user/.mutt/cache" \
    tianon/mutt-gmail

but then I get the following error:

sed: couldn't open temporary file /home/user/sed8FOvTf: Permission denied

Shouldn't -e HOME=/home/user be a path on the host, so that the volumes set by

    -v "$HOME/.signature:/home/user/.signature" \
    -v "$HOME/.muttrc:/home/user/.muttrc.local" \
    -v "$HOME/.mutt/cache:/home/user/.mutt/cache" \

are set correctly?

from dockerfiles.

tianon avatar tianon commented on August 16, 2024

Ah, it probably only works on my machine because user inside the container is uid 1000:1000 and matches the user on my host. 😕

I guess the image needs to be updated to make /home/user have wider permissions. 😞

If you don't care which UID/GID the image actually runs as, you could try this:

$ docker run -it --rm \
    -e TERM \
    -e [email protected] \
    -e GMAIL_NAME='gmailaccount user' \
    -v "$HOME/.signature:/home/user/.signature:ro" \
    -v "$HOME/.muttrc:/home/user/.muttrc.local:ro" \
    -v "mutt-gmailaccountuser:/home/user/.mutt/cache" \
    tianon/mutt-gmail

(The important bit there is using a named volume for ~/.mutt/cache instead of a host volume.)

If you don't care about the local cache (which isn't necessary, but makes repeated runs significantly faster), you can even ditch that volume completely.

from dockerfiles.

hub20xx avatar hub20xx commented on August 16, 2024

Thank you a lot for helping with this!

I used the command you mentioned but I still get sed: couldn't open temporary file /home/user/sedeQk8dH: Permission denied.

from dockerfiles.

tianon avatar tianon commented on August 16, 2024

Ok, let's try simplifying even further to try and narrow this down -- does the following work? (I just tested and it successfully prompts me for a password)

$ docker run -it --rm \
    -e TERM \
    -e [email protected] \
    -e GMAIL_NAME='gmailaccount user' \
    tianon/mutt-gmail

from dockerfiles.

hub20xx avatar hub20xx commented on August 16, 2024

No, it doesn't, I get sed: couldn't open temporary file /home/user/sedKEMqZU: Permission denied

from dockerfiles.

tianon avatar tianon commented on August 16, 2024

I can't reproduce 😕

https://asciinema.org/a/bY2vBS5KAHWIP2kfGFQyoYQnt

from dockerfiles.

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.