Expected behavior
File is modified with sed
Actual behavior
Mac Docker VM crashes
Information
- the output of:
pinata diagnose -u
on OSX
S X: version 10.11.4 (build: 15E65)
Docker.app: version v1.10.3-beta5
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] lofs
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160330-211600.tar.gz.
Upload to bugsnag failed:
2016/03/30 21:16:01 notifying bugsnag: unknown error
2016/03/30 21:16:04 bugsnag.Notify: bugsnag/payload.deliver: Got HTTP 400 Bad Request
- host distribution and version OSX 10.11.4,
Steps to reproduce the behavior
make a script out of this and execute it
#!/bin/bash
mkdir files
touch files/template
cat > files/template << EOT
\${TEXT_BLOB1}
\${TEXT_BLOB2}
\${TEXT_BLOB3}
EOT
touch files/startup.sh
cat > files/startup.sh << EOF
#!/bin/bash
cp template testfile
echo replacing TEXT_BLOB1
sed -i "s~\\\${TEXT_BLOB1}~Hello~g" testfile
echo replacing TEXT_BLOB2
sed -i "s~\\\${TEXT_BLOB2}~again~g" testfile
echo replacing TEXT_BLOB3
sed -i "s~\\\${TEXT_BLOB3}~world~g" testfile
EOF
chmod 755 files/startup.sh
cat > Dockerfile << EOD
FROM centos:centos7
RUN mkdir /opt/sedbugtest
COPY files /opt/sedbugtest/files
RUN chmod +x /opt/sedbugtest/files/startup.sh
ENV PATH \$PATH:/opt/sedbugtest/files
WORKDIR /opt/sedbugtest/files
CMD ["startup.sh"]
EOD
docker build --tag="sedtestbug" .
docker run -it --name sedtest \
-v $PWD/files:/opt/sedbugtest/files \
sedtestbug startup.sh
docker rm sedtest