Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I want to run the official teamspeak image. I want to overwrite the data directory with a directory of my own. Neither -v nor --mount will overwrite the VOLUME from the Dockerfile. Podman run will always create a volume. I do not run podman rootless.
Steps to reproduce the issue:
podman run --user 9987:9987 \
--mount type=bind,src=/mnt/HC_Volume_4317526/teamspeak/data,target=/var/ts3server \
-v /etc/teamspeak/:/var/run/ts3server/ \
-p 9987:9987/udp \
-e TS3SERVER_LICENSE=accept \
--name teamspeak \
--network podstack \
--ip 10.90.0.5
Using -v produces the same result
podman run --user 9987:9987 \
-v /mnt/HC_Volume_4317526/teamspeak/data:/var/ts3server \
-v /etc/teamspeak/:/var/run/ts3server/ \
-p 9987:9987/udp \
-e TS3SERVER_LICENSE=accept \
--name teamspeak \
--network podstack \
--ip 10.90.0.5
Describe the results you received:
Only the directory /var/run/ts3server is bind mounted to the host:
podman inspect teamspeak | jq '.[0].Mounts'
[
{
"Type": "volume",
"Name": "f66b456a5ada124a47cdcc961af9f8ba27a2bc686af0b650b790e9830be29e52",
"Source": "/var/lib/containers/storage/volumes/f66b456a5ada124a47cdcc961af9f8ba27a2bc686af0b650b790e9830be29e52/_data",
"Destination": "/var/ts3server",
"Driver": "local",
"Mode": "",
"Options": [
"nodev",
"exec",
"nosuid",
"rbind"
],
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "f66b456a5ada124a47cdcc961af9f8ba27a2bc686af0b650b790e9830be29e52",
"Source": "/var/lib/containers/storage/volumes/f66b456a5ada124a47cdcc961af9f8ba27a2bc686af0b650b790e9830be29e52/_data",
"Destination": "/var/ts3server",
"Driver": "local",
"Mode": "",
"Options": [
"nodev",
"exec",
"nosuid",
"rbind"
],
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Name": "",
"Source": "/etc/teamspeak",
"Destination": "/var/run/ts3server",
"Driver": "",
"Mode": "",
"Options": [
"rbind"
],
"RW": true,
"Propagation": "rprivate"
}
]
Describe the results you expected:
I expected to both /var/run/ts3server and /var/ts3server to be bind mounted to the host
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Version: 1.8.0
RemoteAPI Version: 1
Go Version: go1.10.1
OS/Arch: linux/amd64
Output of podman info --debug:
debug:
compiler: gc
git commit: ""
go version: go1.10.1
podman version: 1.8.0
host:
BuildahVersion: 1.13.1
CgroupVersion: v1
Conmon:
package: 'conmon: /usr/libexec/podman/conmon'
path: /usr/libexec/podman/conmon
version: 'conmon version 2.0.10, commit: unknown'
Distribution:
distribution: ubuntu
version: "18.04"
MemFree: 1164185600
MemTotal: 2039586816
OCIRuntime:
name: runc
package: 'cri-o-runc: /usr/lib/cri-o-runc/sbin/runc'
path: /usr/lib/cri-o-runc/sbin/runc
version: 'runc version spec: 1.0.1-dev'
SwapFree: 0
SwapTotal: 0
arch: amd64
cpus: 1
eventlogger: journald
hostname: main-vps
kernel: 4.15.0-76-generic
os: linux
rootless: false
uptime: 2h 16m 30.79s (Approximately 0.08 days)
registries:
search:
- docker.io
- quay.io
store:
ConfigFile: /etc/containers/storage.conf
ContainerStore:
number: 6
GraphDriverName: overlay
GraphOptions: {}
GraphRoot: /var/lib/containers/storage
GraphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "true"
Supports d_type: "true"
Using metacopy: "false"
ImageStore:
number: 6
RunRoot: /var/run/containers/storage
VolumePath: /var/lib/containers/storage/volumes
Package info (e.g. output of rpm -q podman or apt list podman):
apt show podman
Package: podman
Version: 1.8.0~2
Priority: optional
Section: devel
Maintainer: Lokesh Mandvekar <[email protected]>
Installed-Size: 76.4 MB
Depends: libseccomp2, libdevmapper1.02.1, libgpgme11, conmon (>= 1.0.0), containers-common (>= 0.1.40-9), cri-o-runc, iptables
Recommends: slirp4netns, containernetworking-plugins (>= 0.8.1), uidmap, varlink
Homepage: https://github.com/containers/libpod.git
Download-Size: 16.0 MB
APT-Manual-Installed: yes
APT-Sources: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04 Packages
Description: Manage pods, containers and container images.
Additional environment details (AWS, VirtualBox, physical, etc.):
The box is a generic Hetzner Cloud VM.
Configuration of the podstack network:
{
"cniVersion": "0.4.0",
"name": "podstack",
"plugins": [
{
"type": "bridge",
"bridge": "cni-podstack",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"routes": [
{
"dst": "0.0.0.0/0"
}
],
"ranges": [
[
{
"subnet": "10.90.0.0/24",
"gateway": "10.90.0.1"
}
]
]
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
},
{
"type": "firewall",
"backend": "iptables"
}
]
}
I'll take this one
Can you provide the name of the image being used in the examples here? I can't reproduce with Podman 1.8.0 trying to mount over an image volume in a custom-built image, so it might be specific to this image.
Actually, just a podman inspect of the image would help a lot... My initial suspicion is that there's something slightly different about this volume mount (trailing / maybe? Something messing up our normal comparison) and inspect should tell us that path
Hey,
Don't have access to my terminal currently, but it was this image
https://hub.docker.com/layers/teamspeak/library/teamspeak/3.11.0/images/sha256-c6bc812dfa39c58ce35d8f742acee51fc33ab6509c1824d071be732b24a17875?context=explore
And you are right it included a trailing / in the volume. I added trailing
slashes in the -v parameter yesterday . No effect.
Matthew Heon notifications@github.com schrieb am So., 16. Feb. 2020,
01:25:
Actually, just a podman inspect of the image would help a lot... My
initial suspicion is that there's something slightly different about this
volume mount (trailing / maybe? Something messing up our normal
comparison) and inspect should tell us that path—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/issues/5219?email_source=notifications&email_token=AACAKGA6HWWU3XGOO3I2KPLRDCBYHA5CNFSM4KV45SKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL32KTY#issuecomment-586655055,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACAKGFL5CI2PQ22WZ2JERLRDCBYHANCNFSM4KV45SKA
.
Thank you for that quick fix!
Most helpful comment
5222 to fix