Force Docker onto overlay2

Both btfs and overlay file systems suffer a very strange bug when executing the following Dockerfile:

```
FROM alpine

RUN mkdir lch

COPY . lch/
COPY requirements.txt lch/requirements.txt
COPY ./requirements/ lch/requirements/

ENTRYPOINT ["/docker-entrypoint.sh"]
```

It fails on the last `COPY` line, due to the presence of the `COPY . lch/` call. Unknown as to why, but moving to the new filesystem fixes things.
This commit is contained in:
Joseph Schorr 2017-11-14 19:23:15 -05:00
parent ebe2f1e78f
commit 86ec24470b

View file

@ -19,6 +19,13 @@ ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCs9jVbzOkDg60i+TGkETit/K9h8iBkwapRa2XURJzdYKcE27fYueX37mOdTBVCi3phOV4cWzkjRwtQBz7KCMBqrr1gLaIsuUIqeFpskTuTr9k7XgZqZ6QpECrqDy9HgCLdZO40sYCOvpw+GzehlsZPZEHRROotXCKc3k98Vlb8+1QPa4s5iZrIIdFyq3ZyhoupcN2nIwMh0GnkvgwS2DymGeLd8tziI8+ti8dxWSvgILaPplv2JTf/iqRsE3xtbtjE0tSf8VyfTLIBv+hyW79Hvaf/pvrsADwJf43IWmdOwHpYNhqR/kvx6j0LkPfxWq+rtXG3Q4JqWi4nZz5w3VTH1KImMBGil2sK1AiCwEUSQzQs2apTivfTy25HFLtje6qB8ZkvelK2lOGI62gdWiOOknYn3VpfMdrPDLGNoTnntrcG/UbJoa911IxilP4idbUxXQdyIzYr6BJJccCFiLVECPHoOaDsZ0abkBvrewp+1hqsvL7zRs4EvbI7Cfvcnf9hZd+n20Bp250GbcH0HD4/9d2DMIU6c6rAjmglPfVmyphcRruWdyCZz+ps9cfpVCQSSGSnbGS7T3M4VIXrCtjNZ7Fv7YIJ8EXWlhkNEfOYuy/lhfvyMLrp5abg5HkXSgOA3kfyitLnBN/lJODSUguDPmpo7tyjplEFQ70LYxJczw== EvB Key
write_files:
- path: /etc/docker/daemon.json
permission: '0644'
content: |
{
"storage-driver": "overlay2"
}
- path: /root/overrides.list
permission: '0644'
content: |
@ -69,30 +76,6 @@ coreos:
after_units=['quay-builder.service']
) | indent(4) }}
{%- endif %}
- name: format-var-lib-docker.service
command: start
content: |
[Unit]
Before=docker.service var-lib-docker.mount
ConditionPathExists=!/var/lib/docker.btrfs
[Service]
Type=oneshot
ExecStart=/usr/bin/truncate --size={{ volume_size }} /var/lib/docker.btrfs
ExecStart=/usr/sbin/mkfs.btrfs /var/lib/docker.btrfs
- name: var-lib-docker.mount
enable: true
content: |
[Unit]
Before=docker.service
After=format-var-lib-docker.service
Requires=format-var-lib-docker.service
[Install]
RequiredBy=docker.service
[Mount]
What=/var/lib/docker.btrfs
Where=/var/lib/docker
Type=btrfs
Options=loop,discard
- name: machine-lifetime.service
command: start
enable: yes