You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While attempting to build some large-ish rather complex images, I encountered issues with modifying files in a parent image. This is a simplified repro:
# img version
img:
version : v0.2.3
git hash : d87fd73
go version : go1.10
go compiler : gc
platform : linux/amd64
Dockerfile:
# cat parent/Dockerfile
FROM alpine:3.5
RUN touch /etc/hosts2
RUN touch /etc/hosts
Works with Docker:
# docker build -t parent:local parent
Sending build context to Docker daemon 2.048kB
Step 1/3 : FROM alpine:3.5
---> 6c6084ed97e5
Step 2/3 : RUN touch /etc/hosts2
---> Running in fa8e9856a390
---> be982136ee56
Removing intermediate container fa8e9856a390
Step 3/3 : RUN touch /etc/hosts
---> Running in 780c5673e180
---> 8ccb2f085b5d
Removing intermediate container 780c5673e180
Successfully built 8ccb2f085b5d
Successfully tagged parent:local
Doesn't work with img:
# img build -t parent:local parent
Building parent:local
Setting up the rootfs... this may take a bit.
INFO[0001] resolving docker.io/library/alpine:3.5@sha256:9148d069e50eee519ec45e5683e56a1c217b61a52ed90eb77bdce674cc212f1e
RUN [/bin/sh -c touch /etc/hosts2]
--->
<--- bc0sl9ywmszi31wmcv8k0ssln 0 <nil>
RUN [/bin/sh -c touch /etc/hosts]
--->
touch: /etc/hosts: Read-only file system
<--- khsm1r5bve0h0bqmkk1l5064j 1 <nil>
solving failed: executor failed running [/bin/sh -c touch /etc/hosts]: exit code 1
The text was updated successfully, but these errors were encountered:
jessfraz
changed the title
Error: 'Read-only file system' when attempting to modify files in parent image during build
modifying /etc/hosts or /etc/resolv.conf in build fails
May 31, 2018
While attempting to build some large-ish rather complex images, I encountered issues with modifying files in a parent image. This is a simplified repro:
Dockerfile:
Works with Docker:
Doesn't work with img:
The text was updated successfully, but these errors were encountered: