Bug 203911

Summary: sysutils/docker-freebsd: Cannot modify existing files when building images
Product: Ports & Packages Reporter: Yonas Yanfa <yonas>
Component: Individual Port(s)Assignee: Jochen Neumeister <joneum>
Status: Open ---    
Severity: Affects Only Me CC: amontalban, rvernica, w.schwarzenfeld
Priority: --- Keywords: needs-qa
Version: Latest   
Hardware: Any   
OS: Any   

Description Yonas Yanfa 2015-10-21 04:49:39 UTC
I've been trying to customize my resolv.conf using this Dockerfile:


FROM lexaguskov/freebsd
RUN echo "nameserver 192.168.2.1" > /etc/resolv.conf


I'm building it via `docker build -f Dockerfile -t yonas/freebsd .`

but `docker run --rm -it yonas/freebsd cat /etc/resolv.conf` shows it's empty.

I can add files to the image's filesystem, but not modify existing files from the lexaguskov/freebsd image.

I've tested using FreeBSD 10.2 release and FreeBSD 11 current:

FreeBSD freebsd-server1 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

FreeBSD fbsd11 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r287930: Thu Sep 17 20:40:12 UTC 2015     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
Comment 1 Andres Montalban 2016-03-22 14:32:34 UTC
Hi,

I'm having the same error with /etc/resolv.conf, based on research it seems that the DNS settings are populated by Docker on run or build.

In Linux this is configurable in /etc/default/docker with variable DOCKER_OPTS but this doesn't seem to be the case in FreeBSD (I tried to modify the rc script to export the env variable DOCKER_OPTS or even passing --dns 8.8.8.8 as parameter on docker daemon start without luck). For more info [1].

I'm going to test latest upstream version of Docker to see if that solves the issue as kvasdopil work was merged in [2].


Thanks!

[1] https://docs.docker.com/engine/userguide/networking/default_network/configure-dns/
[2] https://github.com/docker/docker/pull/13542
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-13 21:41:39 UTC
Is this still  relevant?
Comment 3 Tobias Kortkamp freebsd_committer 2018-11-14 10:42:33 UTC
Reset assignee.  kmoore@ has dropped maintainership in ports r434114.
The port currently has no maintainer.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-07 10:48:46 UTC
Assign to new recent maintainer (ports r489312)
Comment 5 Walter Schwarzenfeld freebsd_triage 2019-08-05 22:52:25 UTC
EXPIRATION_DATE=        2019-09-04.