slimtoolkit / slimtoolkit/slim
results status='no data collected (no minified image generated). (version: linux|Transformer|latest|latest|latest)'u
Open
Nobody has claimed this yet.
DONE
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
I test the sample python_ubuntu.
use command :
docker-slim --debug build --http-probe my/sample-python-app
but has no effect:
results status='no data collected (no minified image generated). (version: linux|Transformer|latest|latest|latest)'
logs
./docker-slim --debug build --http-probe my/sample-python-app
time="2019-09-14T14:57:08+08:00" level=debug msg="sysinfo => system.SystemInfo{Sysname:"Linux", Nodename:"master1", Release:"4.4.58-20180615.kylin.server.YUN+-generic", Version:"#kylin SMP Tue Jul 10 14:55:31 CST 2018", Machine:"aarch64", Domainname:"(none)", OsName:"Ubuntu 16.04 LTS (Xenial Xerus)", OsBuild:""}"
docker-slim[build]: info=http.probe message='using default probe'
time="2019-09-14T14:57:08+08:00" level=debug msg="docker-slim: new Docker client (default) [6]"
time="2019-09-14T14:57:08+08:00" level=debug msg="docker-slim: configured DOCKER_HOST env var"
docker-slim[build]: state=started
docker-slim[build]: info=params target=my/sample-python-app continue.mode=enter
time="2019-09-14T14:57:08+08:00" level=info msg="image=my/sample-python-app http-probe=true remove-file-artifacts=false image-overrides=map[] entrypoint=[] (false) cmd=[] (false) workdir='' env=[] expose=map[]" app=docker-slim command=build
docker-slim[version]: linux|Transformer|latest|latest|latest
host:
OsName=Ubuntu 16.04 LTS (Xenial Xerus)
OsBuild=
Version=#kylin SMP Tue Jul 10 14:55:31 CST 2018
Release=4.4.58-20180615.kylin.server.YUN+-generic
Sysname=Linux
docker:
Name=master1
KernelVersion=4.4.58-20180615.kylin.server.YUN+-generic
OperatingSystem=Ubuntu 16.04 LTS
OSType=linux
ServerVersion=18.06.3-ce
Architecture=aarch64
ApiVersion=1.38
MinAPIVersion=1.12
BuildTime=2019-02-20T02:34:57.000000000+00:00
GitCommit=d7080c1
docker-slim[build]: state=image.inspection.start
time="2019-09-14T14:57:08+08:00" level=info msg="inspecting 'fat' image metadata..." app=docker-slim command=build
time="2019-09-14T14:57:08+08:00" level=debug msg="PrepareImageStateDirs(,sha256:64df02973caa16de36e6ec9eaac95a5184f3d7bb4b34df3454afbc654b0a7e98)"
time="2019-09-14T14:57:08+08:00" level=debug msg="PrepareImageStateDirs - removing existing state location: /opt/cww/docker_slim/.docker-slim-state/images/64df02973caa16de36e6ec9eaac95a5184f3d7bb4b34df3454afbc654b0a7e98/artifacts"
time="2019-09-14T14:57:08+08:00" level=debug msg="PrepareImageStateDirs - created new image state location: /opt/cww/docker_slim/.docker-slim-state/images/64df02973caa16de36e6ec9eaac95a5184f3d7bb4b34df3454afbc654b0a7e98/artifacts"
docker-slim[build]: info=image id=sha256:64df02973caa16de36e6ec9eaac95a5184f3d7bb4b34df3454afbc654b0a7e98 size.bytes=354957649 size.human=355 MB
time="2019-09-14T14:57:08+08:00" level=info msg="processing 'fat' image info..." app=docker-slim command=build
time="2019-09-14T14:57:08+08:00" level=debug msg="
IMAGE HISTORY =>
[]docker.ImageHistory{docker.ImageHistory{ID:"sha256:64df02973caa16de36e6ec9eaac95a5184f3d7bb4b34df3454afbc654b0a7e98", Tags:[]string{"my/sample-python-app:latest"}, Created:1568443759, CreatedBy:"/bin/sh -c #(nop) ENTRYPOINT [\"python\" \"/opt/my/service/server.py\"]", Size:0, Comment:""}, docker.ImageHistory{ID:"sha256:736fad768c0cf4963872d27d2a8a18ae6064707b433c1db89d21a458580ca5a3", Tags:[]string(nil), Created:1568443758, CreatedBy:"/bin/sh -c #(nop) EXPOSE 9000", Size:0, Comment:""}, docker.ImageHistory{ID:"sha256:cdf918a487fce5f211aedb9b1b833b5ea7ddebdfa3b8173860192f1d91099ecb", Tags:[]string(nil), Created:1568443758, CreatedBy:"/bin/sh -c pip install -r requirements.txt", Size:5712329, Comment:""}, docker.ImageHistory{ID:"sha256:eb55974e217835025305c4398f384594d828028daa420ace38da3565dc51ec0d", Tags:[]string(nil), Created:1568443649, CreatedBy:"/bin/sh -c #(nop) WORKDIR /opt/my/service", Size:0, Comment:""}, docker.ImageHistory{ID:"sha256:b933a0f06da4d422c5c6346e235598f35ea665396dcf3effbd75deb8371c8f87", Tags:[]string(nil), Created:1568443649, CreatedBy:"/bin/sh -c #(nop) COPY dir:67e41f52b338b9f299be60133fcb3c2f2d4da8f09edae75da437aa31526c58b4 in /opt/my/service ", Size:520, Comment:""}, docker.ImageHistory{ID:"sha256:ad4c4ba6e386fd92f34a564c234e161afc626a9a3a96dc9d4ea9a05c98ec562a", Tags:[]string(nil), Created:1568443648, CreatedBy:"/bin/sh -c apt-get update && \t\tapt-get -y install python-software-properties python g++ make && \t\tapt-get -y install python-dev && \t\tapt-get -y install python-pip && \t\tmkdir -p /opt/my/service", Size:169277370, Comment:""}, docker.ImageHistory{ID:"sha256:fefd76bbcd519236af9484d849b04f213514518c8cde7dbf58b12cac7d0d1563", Tags:[]string{"ubuntu:14.04"}, Created:1557957720, CreatedBy:"/bin/sh -c #(nop) CMD [\"/bin/bash\"]", Size:0, Comment:""}, docker.ImageHistory{ID:"<missing>", Tags:[]string(nil), Created:1557957719, CreatedBy:"/bin/sh -c mkdir -p /run/systemd && echo 'docker' > /run/systemd/container", Size:7, Comment:""}, docker.ImageHistory{ID:"<missing>", Tags:[]string(nil), Created:1557957717, CreatedBy:"/bin/sh -c rm -rf /var/lib/apt/lists/*", Size:0, Comment:""}, docker.ImageHistory{ID:"<missing>", Tags:[]string(nil), Created:1557957715, CreatedBy:"/bin/sh -c set -xe \t\t&& echo '#!/bin/sh' > /usr/sbin/policy-rc.d \t&& echo 'exit 101' >> /usr/sbin/policy-rc.d \t&& chmod +x /usr/sbin/policy-rc.d \t\t&& dpkg-divert --local --rename --add /sbin/initctl \t&& cp -a /usr/sbin/policy-rc.d /sbin/initctl \t&& sed -i 's/^exit.*/exit 0/' /sbin/initctl \t\t&& echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup \t\t&& echo 'DPkg::Post-Invoke { \"rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true\"; };' > /etc/apt/apt.conf.d/docker-clean \t&& echo 'APT::Update::Post-Invoke { \"rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true\"; };' >> /etc/apt/apt.conf.d/docker-clean \t&& echo 'Dir::Cache::pkgcache \"\"; Dir::Cache::srcpkgcache \"\";' >> /etc/apt/apt.conf.d/docker-clean \t\t&& echo 'Acquire::Languages \"none\";' > /etc/apt/apt.conf.d/docker-no-languages \t\t&& echo 'Acquire::GzipIndexes \"true\"; Acquire::CompressionTypes::Order:: \"gz\";' > /etc/apt/apt.conf.d/docker-gzip-indexes \t\t&& echo 'Apt::AutoRemove::SuggestsImportant \"false\";' > /etc/apt/apt.conf.d/docker-autoremove-suggests", Size:186273, Comment:""}, docker.ImageHistory{ID:"<missing>", Tags:[]string(nil), Created:1557957709, CreatedBy:"/bin/sh -c #(nop) ADD file:c48fe465f169473834c82ad7e6de1ad8ab02f6fc2d292f2b1ee50764588b4cc7 in / ", Size:179781150, Comment:""}}
"
time="2019-09-14T14:57:08+08:00" level=debug msg="IMAGE INSTRUCTIONS:"
time="2019-09-14T14:57:08+08:00" level=debug msg="# new image"
time="2019-09-14T14:57:08+08:00" level=debug msg="ADD file:c48fe465f169473834c82ad7e6de1ad8ab02f6fc2d292f2b1ee50764588b4cc7 in /"
time="2019-09-14T14:57:08+08:00" level=debug msg="RUN set -xe && \
echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \
echo 'exit 101' >> /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
dpkg-divert --local --rename --add /sbin/initctl && \
cp -a /usr/sbin/policy-rc.d /sbin/initctl && \
sed -i 's/^exit.*/exit 0/' /sbin/initctl && \
echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup && \
echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean && \
echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean && \
echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean && \
echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages && \
echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes && \
echo 'Apt::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/docker-autoremove-suggests"
time="2019-09-14T14:57:08+08:00" level=debug msg="RUN rm -rf /var/lib/apt/lists/*"
time="2019-09-14T14:57:08+08:00" level=debug msg="RUN mkdir -p /run/systemd && \
echo 'docker' > /run/systemd/container"
time="2019-09-14T14:57:08+08:00" level=debug msg="CMD ["/bin/bash"]"
time="2019-09-14T14:57:08+08:00" level=debug msg="# end of image: ubuntu:14.04 (id: sha256:fefd76bbcd519236af9484d849b04f213514518c8cde7dbf58b12cac7d0d1563 tags: ubuntu:14.04)"
time="2019-09-14T14:57:08+08:00" level=debug
time="2019-09-14T14:57:08+08:00" level=debug msg="# new image"
time="2019-09-14T14:57:08+08:00" level=debug msg="RUN apt-get update && \
apt-get -y install python-software-properties python g++ make && \
apt-get -y install python-dev && \
apt-get -y install python-pip && \
mkdir -p /opt/my/service"
time="2019-09-14T14:57:08+08:00" level=debug msg="COPY dir:67e41f52b338b9f299be60133fcb3c2f2d4da8f09edae75da437aa31526c58b4 in /opt/my/service"
time="2019-09-14T14:57:08+08:00" level=debug msg="WORKDIR /opt/my/service"
time="2019-09-14T14:57:08+08:00" level=debug msg="RUN pip install -r requirements.txt"
time="2019-09-14T14:57:08+08:00" level=debug msg="EXPOSE 9000"
time="2019-09-14T14:57:08+08:00" level=debug msg="ENTRYPOINT ["python" "/opt/my/service/server.py"]"
time="2019-09-14T14:57:08+08:00" level=debug msg="# end of image: my/sample-python-app:latest (id: sha256:64df02973caa16de36e6ec9eaac95a5184f3d7bb4b34df3454afbc654b0a7e98 tags: my/sample-python-app:latest)"
time="2019-09-14T14:57:08+08:00" level=debug
docker-slim[build]: info=image.stack index=0 name='ubuntu:14.04' id='sha256:fefd76bbcd519236af9484d849b04f213514518c8cde7dbf58b12cac7d0d1563'
docker-slim[build]: info=image.stack index=1 name='my/sample-python-app:latest' id='sha256:64df02973caa16de36e6ec9eaac95a5184f3d7bb4b34df3454afbc654b0a7e98'
docker-slim[build]: info=image.exposed_ports list='9000'
docker-slim[build]: state=image.inspection.done
docker-slim[build]: state=container.inspection.start
time="2019-09-14T14:57:08+08:00" level=info msg="starting instrumented 'fat' container..." app=docker-slim command=build
time="2019-09-14T14:57:08+08:00" level=debug msg="RunContainer: default exposed ports => map[docker.Port]struct {}{"65501/tcp":struct {}{}, "65502/tcp":struct {}{}}"
docker-slim[build]: info=container status=created id=01a0ccfe1482fefa036ebb9c26fd6fa607cb559471d9729d0ef7f6aa1f2340ae
time="2019-09-14T14:57:09+08:00" level=debug msg="RunContainer: container NetworkSettings.Ports => map[docker.Port][]docker.PortBinding{"65501/tcp":[]docker.PortBinding{docker.PortBinding{HostIP:"0.0.0.0", HostPort:"32772"}}, "65502/tcp":[]docker.PortBinding{docker.PortBinding{HostIP:"0.0.0.0", HostPort:"32771"}}, "9000/tcp":[]docker.PortBinding{docker.PortBinding{HostIP:"0.0.0.0", HostPort:"32773"}}}"
time="2019-09-14T14:57:09+08:00" level=debug msg="cmdChannelAddr=tcp://127.0.0.1:32772 evtChannelAddr=tcp://127.0.0.1:32771"
time="2019-09-14T14:57:09+08:00" level=debug msg="sendCmd(&{AppName:python AppArgs:[/opt/my/service/server.py] AppUser: Excludes:[] Includes:[] IncludeBins:[] IncludeExes:[] IncludeShell:false})"
docker-slim[build]: info=cmd.startmonitor status=sent
time="2019-09-14T14:57:09+08:00" level=debug msg="getEvt()"
time="2019-09-14T14:57:11+08:00" level=debug msg="version.Check: http status = 200 OK" app=docker-slim
time="2019-09-14T14:57:12+08:00" level=debug msg="getEvt(): channel.Recv() - done [evt={"name":"event.monitor.start.done"},err=<nil>]"
docker-slim[build]: info=event.startmonitor.done status=received
docker-slim[build]: info=container name=dockerslimk_31952_20190914065708 id=01a0ccfe1482fefa036ebb9c26fd6fa607cb559471d9729d0ef7f6aa1f2340ae target.port.list=[32773] target.port.info=[9000/tcp => 0.0.0.0:32773] message='YOU CAN USE THESE PORTS TO INTERACT WITH THE CONTAINER'
time="2019-09-14T14:57:12+08:00" level=info msg="watching container monitor..." app=docker-slim command=build
time="2019-09-14T14:57:12+08:00" level=debug msg="HTTP probe - available ports => map[32773:{}]"
time="2019-09-14T14:57:12+08:00" level=debug msg="HTTP probe - delete exposed port from the available ports => 32773 (9000/tcp)"
time="2019-09-14T14:57:12+08:00" level=debug msg="HTTP probe - probe.Ports => [32773]"
docker-slim[build]: state=http.probe.starting message='WAIT FOR HTTP PROBE TO FINISH'
docker-slim[build]: info=prompt message='USER INPUT REQUIRED, PRESS <ENTER> WHEN YOU ARE DONE USING THE CONTAINER'
docker-slim[build]: state=http.probe.running
time="2019-09-14T14:57:21+08:00" level=info msg="HTTP probe started..."
docker-slim[build]: info=http.probe.call status=200 method=GET target=http://127.0.0.1:32773/ attempt=1 time=2019-09-14T06:57:21Z
time="2019-09-14T14:57:21+08:00" level=info msg="HTTP probe done."
docker-slim[build]: info=http.probe.summary total=1 failures=0 successful=1
docker-slim[build]: state=http.probe.done
docker-slim[build]: state=container.inspection.finishing
time="2019-09-14T14:58:30+08:00" level=debug msg="sendCmd(&{})"
time="2019-09-14T14:58:30+08:00" level=debug msg="RunContainer: Docker event monitor stopped"
time="2019-09-14T14:58:30+08:00" level=debug msg="'stop' monitor response => 'ok'"
time="2019-09-14T14:58:30+08:00" level=info msg="waiting for the container to finish its work..."
time="2019-09-14T14:58:30+08:00" level=debug msg="getEvt()"
time="2019-09-14T15:00:30+08:00" level=debug msg="getEvt(): channel.Recv() - done [evt=,err=receive time out]"
time="2019-09-14T15:00:30+08:00" level=debug msg="sensor event => '<nil>'"
time="2019-09-14T15:00:30+08:00" level=info msg="timeout waiting for the docker-slim container to finish its work..."
time="2019-09-14T15:00:30+08:00" level=info msg="shutting down 'fat' container..." app=docker-slim command=build
time="2019-09-14T15:00:30+08:00" level=info msg="can't stop the docker-slim container (container is not running)..."
docker-slim[build]: state=container.inspection.artifact.processing
docker-slim: Fat image - Dockerfile instructures: start ====
# new image
ADD file:c48fe465f169473834c82ad7e6de1ad8ab02f6fc2d292f2b1ee50764588b4cc7 in /
RUN set -xe && \
echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \
echo 'exit 101' >> /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
dpkg-divert --local --rename --add /sbin/initctl && \
cp -a /usr/sbin/policy-rc.d /sbin/initctl && \
sed -i 's/^exit.*/exit 0/' /sbin/initctl && \
echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup && \
echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean && \
echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean && \
echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean && \
echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages && \
echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes && \
echo 'Apt::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/docker-autoremove-suggests
RUN rm -rf /var/lib/apt/lists/*
RUN mkdir -p /run/systemd && \
echo 'docker' > /run/systemd/container
CMD ["/bin/bash"]
# end of image: ubuntu:14.04 (id: sha256:fefd76bbcd519236af9484d849b04f213514518c8cde7dbf58b12cac7d0d1563 tags: ubuntu:14.04)
# new image
RUN apt-get update && \
apt-get -y install python-software-properties python g++ make && \
apt-get -y install python-dev && \
apt-get -y install python-pip && \
mkdir -p /opt/my/service
COPY dir:67e41f52b338b9f299be60133fcb3c2f2d4da8f09edae75da437aa31526c58b4 in /opt/my/service
WORKDIR /opt/my/service
RUN pip install -r requirements.txt
EXPOSE 9000
ENTRYPOIN
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported docker-slim --debug build --http-probe my/sample-python-app command using the python_ubuntu sample and inspect the debug output around container monitoring and HTTP probing. The fix is complete when the command collects runtime data and generates a minified image instead of reporting no data collected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, linux, python
- Domain
- cli, devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100