Comments (7)
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.
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.
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.
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.
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.
No, it doesn't, I get sed: couldn't open temporary file /home/user/sedKEMqZU: Permission denied
from dockerfiles.
I can't reproduce 😕
https://asciinema.org/a/bY2vBS5KAHWIP2kfGFQyoYQnt
from dockerfiles.
Related Issues (20)
- Speedtest Accept license HOT 3
- Can't launch steam image HOT 9
- Exim4 Implicit TLS HOT 1
- tianon/containerd: failed to mount /var/lib/containerd/tmpmounts/containerd-mount796827023: operation not permitted: unknown HOT 4
- exim4 docker image HOT 3
- Steam container runs DotA, but no sound HOT 4
- Handbrake Dockerfile fails because of missing GPG server pool DNS record HOT 3
- Question about the true.asm (can you shave one more byte off? :) ) HOT 5
- About docker in docker - how to make it work without parent sock file HOT 1
- Question: where to see Dockerfile for tianon/centos:6.5 HOT 1
- speedtest accept license HOT 2
- misleading docker hub documentation about /etc/mailname HOT 1
- can't locate the signal-desktop HOT 2
- Exim4 relay rejected for ipv6 host HOT 1
- ehour doesn't seem to be running HOT 3
- tianon/true stopped working after latest update HOT 4
- Request to support arm64 arch for toybox HOT 2
- exim4: exim doesn't seem to obey retry rules HOT 1
- Steam image cannot launch steam twice HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerfiles.