slimtoolkit / slimtoolkit/slim
Not able to create slim images with - Docker slim 1.39.0
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 841
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
On running docker-slim build $IMAGE , create a SLIM image
using dummy helloworld python image.
Can somebody please help with this, do i need to do more with my config params?
Actual Behavior
$ testpy % docker-slim build hello-world-python
Getting below exception
app='docker-slim' message='Join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
app='docker-slim' message='Join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
app='docker-slim' message='GitHub Discussions' info='https://github.com/docker-slim/docker-slim/discussions'
cmd=build info=param.http.probe message='using default probe'
cmd=build state=started
cmd=build info=params target.type='image' target='hello-world-python' continue.mode='probe' rt.as.user='true' keep.perms='true' tags=''
cmd=build state=image.inspection.start
cmd=build info=image id='sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93' size.bytes='954012097' size.human='954 MB'
cmd=build info=image.stack index='0' name='python:3' id='sha256:75cc8d87cc34bdb26dfcbe6c9e4483d9b483761510b5069852f52bd8431b8012'
cmd=build info=image.stack index='1' name='hello-world-python:latest' id='sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93'
cmd=build info=image.exposed_ports list='3000'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
cmd=build info=container status='created' name='dockerslimk_13051_20221228001142' id='789e33a74a0202417cb75c29311097e87786ecba71d1b699141d46dab913618d'
cmd=build info=container status='running' name='dockerslimk_13051_20221228001142' id='789e33a74a0202417cb75c29311097e87786ecba71d1b699141d46dab913618d'
cmd=build info=container message='obtained IP address' ip='172.17.0.3'
cmd=build info=cmd.startmonitor status='sent'
cmd=build info=event.startmonitor.done status='received.unexpected' data='&{Name:event.monitor.start.failed Data:}'
cmd=build info=report file='slim.report.json'
time="2022-12-27T17:11:44-07:00" level=fatal msg="docker-slim: failure" error="unexpected event type" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x2a8f160, 0xc0004a8c60})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x5e\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).FailOn(0xc000432000?, {0x2a8f160?, 0xc0004a8c60?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/execontext.go:56 +0x49\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand(_, , {, _}, , {, }, {, _}, {0x0, ...}, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/handler.go:876 +0x456b\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0xc000390d40)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:607 +0x4730\ngithub.com/urfave/cli/v2.(*Command).Run(0x3865720, 0xc00058c680)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x5dc\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc000007ba0, {0x2aa85d0?, 0xc000198008}, {0xc00018e090, 0x3, 0x3})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0xb7d\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:224\ngithub.com/docker-slim/docker-slim/pkg/app/master.Run()\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/app.go:15 +0x46\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/docker-slim/main.go:15 +0x18e\n" version="darwin|Transformer|1.39.0|latest|latest"
Steps to Reproduce the Problem
-
% cat Dockerfile
FROM python:3
ADD helloworld.py /
RUN pip install flask
RUN pip install flask_restful
EXPOSE 3000
CMD [ "python", "./helloworld.py"] -
% cat helloworld.py
from flask import Flask, request
from flask_restful import Resource, Apiapp = Flask(name)
api = Api(app)class Greeting (Resource):
def get(self):
return 'Hello World!'api.add_resource(Greeting, '/') # Route_1
if name == 'main':
app.run('0.0.0.0','3000') -
To build the image, run
docker build -t hello-world-python .
docker-slim build --http-probe=false hello-world-python # tried with http-probe=false
Specifications
-
Version:
% docker-slim --version
docker-slim version darwin|Transformer|1.39.0|latest|latest
% docker --version
Docker version 20.10.22, build 3a2c30b63a -
Platform:
Software:
System Software Overview:
System Version: macOS 13.1 (22C65)
Kernel Version: Darwin 22.2.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Hardware:
Hardware Overview:
Model Name: MacBook Pro
Model Identifier: MacBookPro14,3
Processor Name: Quad-Core Intel Core i7
Processor Speed: 2.9 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 8 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
System Firmware Version: 499.40.2.0.0
OS Loader Version: 564.40.4~55
Debug Mode Output
% docker-slim --debug build --http-probe=true hello-world-python
time="2022-12-27T17:22:23-07:00" level=debug msg="sysinfo => system.SystemInfo{Sysname:\"darwin\", Nodename:\"C02VC92QHTD6\", Release:\"22.2.0\", Version:\" Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64\", Machine:\"x86_64\", Domainname:\"\", OsBuild:\"22C65\", Distro:system.DistroInfo{Name:\"\", Version:\"\", DisplayName:\"other\"}}"
app='docker-slim' message='Join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
app='docker-slim' message='Join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
app='docker-slim' message='GitHub Discussions' info='https://github.com/docker-slim/docker-slim/discussions'
time="2022-12-27T17:22:23-07:00" level=debug msg="param.error.app.options - no app params"
cmd=build info=param.http.probe message='using default probe'
time="2022-12-27T17:22:23-07:00" level=debug msg="customImageTag='', additionalTags=[]string(nil)" app=docker-slim command=build
time="2022-12-27T17:22:23-07:00" level=debug msg="docker-slim: new Docker client (env) [5]"
cmd=build state=started
cmd=build info=params rt.as.user='true' keep.perms='true' tags='' target.type='image' target='hello-world-python' continue.mode='probe'
time="2022-12-27T17:22:23-07:00" level=info msg="image=hello-world-python http-probe=true remove-file-artifacts=false image-overrides=map[] entrypoint=[] (false) cmd=[] (false) workdir='' env=[] expose=map[]" app=docker-slim command=build
cmd=build info=app container='false' dsimage='false' location='/usr/local/bin' cmd='build' version='darwin|Transformer|1.39.0|latest|latest'
cmd=build info=host osbuild='22C65' version=' Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64' release='22.2.0' sysname='darwin' cmd='build' osname='other'
cmd=build info=docker cmd='build' name='default' kernel.version='4.19.130-boot2docker' operating.system='Boot2Docker 19.03.12 (TCL 10.1)' ostype='linux' server.version='19.03.12' architecture='x86_64'
cmd=build info=dclient build.time='2020-06-22T15:49:35.000000000+00:00' git.commit='48a66213fe' cmd='build' api.version='1.40' mini.api.version='1.12'
cmd=build state=image.inspection.start
time="2022-12-27T17:22:23-07:00" level=info msg="inspecting 'fat' image metadata..." app=docker-slim command=build
time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs(,sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93)"
time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - statePrefix=/usr/local/bin appDir=/usr/local/bin badPath=/usr/local/bin"
time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - overriding state path to /tmp/docker-slim-state"
time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - statePrefix=/tmp/docker-slim-state appDir=/usr/local/bin badPath=/usr/local/bin"
time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - copying sensor to state path (to /tmp/docker-slim-state)"
time="2022-12-27T17:22:23-07:00" level=debug msg="CopyRegularFile(false,/usr/local/bin/docker-slim-sensor,/tmp/docker-slim-state/docker-slim-sensor,true)"
time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - removing existing state location: /tmp/docker-slim-state/.docker-slim-state/images/4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93/artifacts"
time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - created new image state location: /tmp/docker-slim-state/.docker-slim-state/images/4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93/artifacts"
time="2022-12-27T17:22:23-07:00" level=debug msg="localVolumePath=/tmp/docker-slim-state/.docker-slim-state/images/4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93, artifactLocation=/tmp/docker-slim-state/.docker-slim-state/images/4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93/artifacts, statePath=/tmp/docker-slim-state, stateKey=4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93" app=docker-slim command=build
cmd=build info=image size.bytes='954012097' size.human='954 MB' id='sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93'
time="2022-12-27T17:22:23-07:00" level=info msg="processing 'fat' image info..." app=docker-slim command=build
time="2022-12-27T17:22:23-07:00" level=debug msg="\n\nIMAGE HISTORY =>\n[]docker.ImageHistory{docker.ImageHistory{ID:\"sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93\", Tags:[]string{\"hello-world-python:latest\"}, Created:1672186011, CreatedBy:\"/bin/sh -c #(nop) CMD [\\\"python\\\" \\\"./helloworld.py\\\"]\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:5041e3ae0e16cf067dc7fae37c9fae5ec1e86a2f4e3b6b6402acad8c820af398\", Tags:[]string(nil), Created:1672186010, CreatedBy:\"/bin/sh -c #(nop) EXPOSE 3000\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:1de0cca84141a13dfe4763761c26f2847fa9663b05a87cfd118623678f1275c0\", Tags:[]string(nil), Created:1672186010, CreatedBy:\"/bin/sh -c pip install flask_restful\", Size:2687730, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:93912aad3157ec8fe403cebbc76461c9fc1fc81854bfe26ecc8a53d87678d33b\", Tags:[]string(nil), Created:1672186008, CreatedBy:\"/bin/sh -c pip install flask\", Size:19526376, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:ab89ad1cfde54009d37e38c838391bc55486b3fb735357586eafc2b4a28e9f0e\", Tags:[]string(nil), Created:1672186003, CreatedBy:\"/bin/sh -c #(nop) ADD file:084979ddba9db3e62516a7493bfbf53499de3da988545ec835c92f935735846d in / \", Size:292, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:75cc8d87cc34bdb26dfcbe6c9e4483d9b483761510b5069852f52bd8431b8012\", Tags:[]string{\"python:3\"}, Created:1671647810, CreatedBy:\"/bin/sh -c #(nop) CMD [\\\"python3\\\"]\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671647810, CreatedBy:\"/bin/sh -c set -eux; \\t\\twget -O get-pip.py \\\"$PYTHON_GET_PIP_URL\\\"; \\techo \\\"$PYTHON_GET_PIP_SHA256 *get-pip.py\\\" | sha256sum -c -; \\t\\texport PYTHONDONTWRITEBYTECODE=1; \\t\\tpython get-pip.py \\t\\t--disable-pip-version-check \\t\\t--no-cache-dir \\t\\t--no-compile \\t\\t\\\"pip==$PYTHON_PIP_VERSION\\\" \\t\\t\\\"setuptools==$PYTHON_SETUPTOOLS_VERSION\\\" \\t; \\trm -f get-pip.py; \\t\\tpip --version\", Size:10888898, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671647804, CreatedBy:\"/bin/sh -c #(nop) ENV PYTHON_GET_PIP_SHA256=1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671647804, CreatedBy:\"/bin/sh -c #(nop) ENV PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671647804, CreatedBy:\"/bin/sh -c #(nop) ENV PYTHON_SETUPTOOLS_VERSION=65.5.0\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671647804, CreatedBy:\"/bin/sh -c #(nop) ENV PYTHON_PIP_VERSION=22.3.1\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671647804, CreatedBy:\"/bin/sh -c set -eux; \\tfor src in idle3 pydoc3 python3 python3-config; do \\t\\tdst=\\\"$(echo \\\"$src\\\" | tr -d 3)\\\"; \\t\\t[ -s \\\"/usr/local/bin/$src\\\" ]; \\t\\t[ ! -e \\\"/usr/local/bin/$dst\\\" ]; \\t\\tln -svT \\\"$src\\\" \\\"/usr/local/bin/$dst\\\"; \\tdone\", Size:32, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671647803, CreatedBy:\"/bin/sh -c set -eux; \\t\\twget -O python.tar.xz \\\"https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz\\\"; \\twget -O python.tar.xz.asc \\\"https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc\\\"; \\tGNUPGHOME=\\\"$(mktemp -d)\\\"; export GNUPGHOME; \\tgpg --batch --keyserver hkps://keys.openpgp.org --recv-keys \\\"$GPG_KEY\\\"; \\tgpg --batch --verify python.tar.xz.asc python.tar.xz; \\tcommand -v gpgconf > /dev/null && gpgconf --kill all || :; \\trm -rf \\\"$GNUPGHOME\\\" python.tar.xz.asc; \\tmkdir -p /usr/src/python; \\ttar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \\trm python.tar.xz; \\t\\tcd /usr/src/python; \\tgnuArch=\\\"$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)\\\"; \\t./configure \\t\\t--build=\\\"$gnuArch\\\" \\t\\t--enable-loadable-sqlite-extensions \\t\\t--enable-optimizations \\t\\t--enable-option-checking=fatal \\t\\t--enable-shared \\t\\t--with-lto \\t\\t--with-system-expat \\t\\t--without-ensurepip \\t; \\tnproc=\\\"$(nproc)\\\"; \\tmake -j \\\"$nproc\\\" \\t; \\tmake install; \\t\\tbin=\\\"$(readlink -ve /usr/local/bin/python3)\\\"; \\tdir=\\\"$(dirname \\\"$bin\\\")\\\"; \\tmkdir -p \\\"/usr/share/gdb/auto-load/$dir\\\"; \\tcp -vL Tools/gdb/libpython.py \\\"/usr/share/gdb/auto-load/$bin-gdb.py\\\"; \\t\\tcd /; \\trm -rf /usr/src/python; \\t\\tfind /usr/local -depth \\t\\t\\\\( \\t\\t\\t\\\\( -type d -a \\\\( -name test -o -name tests -o -name idle_test \\\\) \\\\) \\t\\t\\t-o \\\\( -type f -a \\\\( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \\\\) \\\\) \\t\\t\\\\) -exec rm -rf '{}' + \\t; \\t\\tldconfig; \\t\\tpython3 --version\", Size:67749804, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671646969, CreatedBy:\"/bin/sh -c #(nop) ENV PYTHON_VERSION=3.11.1\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671646969, CreatedBy:\"/bin/sh -c #(nop) ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671645270, CreatedBy:\"/bin/sh -c set -eux; \\tapt-get update; \\tapt-get install -y --no-install-recommends \\t\\tlibbluetooth-dev \\t\\ttk-dev \\t\\tuuid-dev \\t; \\trm -rf /var/lib/apt/lists/*\", Size:18482051, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671645265, CreatedBy:\"/bin/sh -c #(nop) ENV LANG=C.UTF-8\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671645265, CreatedBy:\"/bin/sh -c #(nop) ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671621331, CreatedBy:\"/bin/sh -c set -ex; \\tapt-get update; \\tapt-get install -y --no-install-recommends \\t\\tautoconf \\t\\tautomake \\t\\tbzip2 \\t\\tdpkg-dev \\t\\tfile \\t\\tg++ \\t\\tgcc \\t\\timagemagick \\t\\tlibbz2-dev \\t\\tlibc6-dev \\t\\tlibcurl4-openssl-dev \\t\\tlibdb-dev \\t\\tlibevent-dev \\t\\tlibffi-dev \\t\\tlibgdbm-dev \\t\\tlibglib2.0-dev \\t\\tlibgmp-dev \\t\\tlibjpeg-dev \\t\\tlibkrb5-dev \\t\\tliblzma-dev \\t\\tlibmagickcore-dev \\t\\tlibmagickwand-dev \\t\\tlibmaxminddb-dev \\t\\tlibncurses5-dev \\t\\tlibncursesw5-dev \\t\\tlibpng-dev \\t\\tlibpq-dev \\t\\tlibreadline-dev \\t\\tlibsqlite3-dev \\t\\tlibssl-dev \\t\\tlibtool \\t\\tlibwebp-dev \\t\\tlibxml2-dev \\t\\tlibxslt-dev \\t\\tlibyaml-dev \\t\\tmake \\t\\tpatch \\t\\tunzip \\t\\txz-utils \\t\\tzlib1g-dev \\t\\t\\t\\t$( \\t\\t\\tif apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \\t\\t\\t\\techo 'default-libmysqlclient-dev'; \\t\\t\\telse \\t\\t\\t\\techo 'libmysqlclient-dev'; \\t\\t\\tfi \\t\\t) \\t; \\trm -rf /var/lib/apt/lists/*\", Size:528983070, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671621257, CreatedBy:\"/bin/sh -c apt-get update && apt-get install -y --no-install-recommends \\t\\tgit \\t\\tmercurial \\t\\topenssh-client \\t\\tsubversion \\t\\t\\t\\tprocps \\t&& rm -rf /var/lib/apt/lists/*\", Size:151952345, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671621238, CreatedBy:\"/bin/sh -c set -ex; \\tif ! command -v gpg > /dev/null; then \\t\\tapt-get update; \\t\\tapt-get install -y --no-install-recommends \\t\\t\\tgnupg \\t\\t\\tdirmngr \\t\\t; \\t\\trm -rf /var/lib/apt/lists/*; \\tfi\", Size:18952036, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671621231, CreatedBy:\"/bin/sh -c set -eux; \\tapt-get update; \\tapt-get install -y --no-install-recommends \\t\\tca-certificates \\t\\tcurl \\t\\tnetbase \\t\\twget \\t; \\trm -rf /var/lib/apt/lists/*\", Size:10696879, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671585622, CreatedBy:\"/bin/sh -c #(nop) CMD [\\\"bash\\\"]\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"<missing>\", Tags:[]string(nil), Created:1671585621, CreatedBy:\"/bin/sh -c #(nop) ADD file:c13b430c8699df107ffd9ea5230b92238bc037a8e1cbbe35d6ab664941d575da in / \", Size:124092584, Comment:\"\"}}\n\n"
time="2022-12-27T17:22:23-07:00" level=debug msg="IMAGE INSTRUCTIONS:"
time="2022-12-27T17:22:23-07:00" level=debug msg="FROM scratch"
time="2022-12-27T17:22:23-07:00" level=debug msg="# new image"
time="2022-12-27T17:22:23-07:00" level=debug msg="ADD file:c13b430c8699df107ffd9ea5230b92238bc037a8e1cbbe35d6ab664941d575da /"
time="2022-12-27T17:22:23-07:00" level=debug msg="CMD [\"bash\"]\n"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN set -eux; \tapt-get update; \tapt-get install -y --no-install-recommends \t\tca-certificates \t\tcurl \t\tnetbase \t\twget \t; \trm -rf /var/lib/apt/lists/*"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN set -ex; \tif ! command -v gpg > /dev/null; then \t\tapt-get update; \t\tapt-get install -y --no-install-recommends \t\t\tgnupg \t\t\tdirmngr \t\t; \t\trm -rf /var/lib/apt/lists/*; \tfi"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN apt-get update && \\\n\tapt-get install -y --no-install-recommends \t\tgit \t\tmercurial \t\topenssh-client \t\tsubversion \t\t\t\tprocps && \\\n\trm -rf /var/lib/apt/lists/*"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN set -ex; \tapt-get update; \tapt-get install -y --no-install-recommends \t\tautoconf \t\tautomake \t\tbzip2 \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\timagemagick \t\tlibbz2-dev \t\tlibc6-dev \t\tlibcurl4-openssl-dev \t\tlibdb-dev \t\tlibevent-dev \t\tlibffi-dev \t\tlibgdbm-dev \t\tlibglib2.0-dev \t\tlibgmp-dev \t\tlibjpeg-dev \t\tlibkrb5-dev \t\tliblzma-dev \t\tlibmagickcore-dev \t\tlibmagickwand-dev \t\tlibmaxminddb-dev \t\tlibncurses5-dev \t\tlibncursesw5-dev \t\tlibpng-dev \t\tlibpq-dev \t\tlibreadline-dev \t\tlibsqlite3-dev \t\tlibssl-dev \t\tlibtool \t\tlibwebp-dev \t\tlibxml2-dev \t\tlibxslt-dev \t\tlibyaml-dev \t\tmake \t\tpatch \t\tunzip \t\txz-utils \t\tzlib1g-dev \t\t\t\t$( \t\t\tif apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \t\t\t\techo 'default-libmysqlclient-dev'; \t\t\telse \t\t\t\techo 'libmysqlclient-dev'; \t\t\tfi \t\t) \t; \trm -rf /var/lib/apt/lists/*"
time="2022-12-27T17:22:23-07:00" level=debug msg="ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
time="2022-12-27T17:22:23-07:00" level=debug msg="ENV LANG=C.UTF-8"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN set -eux; \tapt-get update; \tapt-get install -y --no-install-recommends \t\tlibbluetooth-dev \t\ttk-dev \t\tuuid-dev \t; \trm -rf /var/lib/apt/lists/*"
time="2022-12-27T17:22:23-07:00" level=debug msg="ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D"
time="2022-12-27T17:22:23-07:00" level=debug msg="ENV PYTHON_VERSION=3.11.1"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN set -eux; \t\twget -O python.tar.xz \"https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz\"; \twget -O python.tar.xz.asc \"https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc\"; \tGNUPGHOME=\"$(mktemp -d)\"; export GNUPGHOME; \tgpg --batch --keyserver hkps://keys.openpgp.org --recv-keys \"$GPG_KEY\"; \tgpg --batch --verify python.tar.xz.asc python.tar.xz; \tcommand -v gpgconf > /dev/null && \\\n\tgpgconf --kill all || :; \trm -rf \"$GNUPGHOME\" python.tar.xz.asc; \tmkdir -p /usr/src/python; \ttar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \trm python.tar.xz; \t\tcd /usr/src/python; \tgnuArch=\"$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)\"; \t./configure \t\t--build=\"$gnuArch\" \t\t--enable-loadable-sqlite-extensions \t\t--enable-optimizations \t\t--enable-option-checking=fatal \t\t--enable-shared \t\t--with-lto \t\t--with-system-expat \t\t--without-ensurepip \t; \tnproc=\"$(nproc)\"; \tmake -j \"$nproc\" \t; \tmake install; \t\tbin=\"$(readlink -ve /usr/local/bin/python3)\"; \tdir=\"$(dirname \"$bin\")\"; \tmkdir -p \"/usr/share/gdb/auto-load/$dir\"; \tcp -vL Tools/gdb/libpython.py \"/usr/share/gdb/auto-load/$bin-gdb.py\"; \t\tcd /; \trm -rf /usr/src/python; \t\tfind /usr/local -depth \t\t\\( \t\t\t\\( -type d -a \\( -name test -o -name tests -o -name idle_test \\) \\) \t\t\t-o \\( -type f -a \\( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \\) \\) \t\t\\) -exec rm -rf '{}' + \t; \t\tldconfig; \t\tpython3 --version"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN set -eux; \tfor src in idle3 pydoc3 python3 python3-config; do \t\tdst=\"$(echo \"$src\" | tr -d 3)\"; \t\t[ -s \"/usr/local/bin/$src\" ]; \t\t[ ! -e \"/usr/local/bin/$dst\" ]; \t\tln -svT \"$src\" \"/usr/local/bin/$dst\"; \tdone"
time="2022-12-27T17:22:23-07:00" level=debug msg="ENV PYTHON_PIP_VERSION=22.3.1"
time="2022-12-27T17:22:23-07:00" level=debug msg="ENV PYTHON_SETUPTOOLS_VERSION=65.5.0"
time="2022-12-27T17:22:23-07:00" level=debug msg="ENV PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py"
time="2022-12-27T17:22:23-07:00" level=debug msg="ENV PYTHON_GET_PIP_SHA256=1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN set -eux; \t\twget -O get-pip.py \"$PYTHON_GET_PIP_URL\"; \techo \"$PYTHON_GET_PIP_SHA256 *get-pip.py\" | sha256sum -c -; \t\texport PYTHONDONTWRITEBYTECODE=1; \t\tpython get-pip.py \t\t--disable-pip-version-check \t\t--no-cache-dir \t\t--no-compile \t\t\"pip==$PYTHON_PIP_VERSION\" \t\t\"setuptools==$PYTHON_SETUPTOOLS_VERSION\" \t; \trm -f get-pip.py; \t\tpip --version"
time="2022-12-27T17:22:23-07:00" level=debug msg="CMD [\"python3\"]\n"
time="2022-12-27T17:22:23-07:00" level=debug msg="# end of image: python:3 (id: tags: python:3)"
time="2022-12-27T17:22:23-07:00" level=debug
time="2022-12-27T17:22:23-07:00" level=debug msg="# new image"
time="2022-12-27T17:22:23-07:00" level=debug msg="ADD file:084979ddba9db3e62516a7493bfbf53499de3da988545ec835c92f935735846d /"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN pip install flask"
time="2022-12-27T17:22:23-07:00" level=debug msg="RUN pip install flask_restful"
time="2022-12-27T17:22:23-07:00" level=debug msg="EXPOSE 3000"
time="2022-12-27T17:22:23-07:00" level=debug msg="CMD [\"python\",\"./helloworld.py\"]\n"
time="2022-12-27T17:22:23-07:00" level=debug msg="# end of image: hello-world-python:latest (id: tags: hello-world-python:latest)"
time="2022-12-27T17:22:23-07:00" level=debug
cmd=build info=image.stack index='0' name='python:3' id='sha256:75cc8d87cc34bdb26dfcbe6c9e4483d9b483761510b5069852f52bd8431b8012'
cmd=build info=image.stack index='1' name='hello-world-python:latest' id='sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93'
cmd=build info=image.exposed_ports list='3000'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
time="2022-12-27T17:22:23-07:00" level=debug msg="FatContainerCmd - [python ./helloworld.py]" app=docker-slim command=build component=container.inspector
time="2022-12-27T17:22:23-07:00" level=info msg="starting instrumented 'fat' container..." app=docker-slim command=build
time="2022-12-27T17:22:23-07:00" level=debug msg="RunContainer: sensor (/tmp/docker-slim-state/docker-slim-sensor) perms => 0777" app=docker-slim command=build component=container.inspector
time="2022-12-27T17:22:23-07:00" level=debug msg="ensureSensorVolume: already have volume = docker-slim-sensor.1.39.0" app=docker-slim command=build component=container.inspector
time="2022-12-27T17:22:23-07:00" level=debug msg="RunContainer: default exposed ports => map[docker.Port]struct {}{\"65501/tcp\":struct {}{}, \"65502/tcp\":struct {}{}}" app=docker-slim command=build component=container.inspector
time="2022-12-27T17:22:23-07:00" level=debug msg="RunContainer: HostConfig.PublishAllPorts => true" app=docker-slim command=build component=container.inspector
cmd=build info=container status='created' name='dockerslimk_13774_20221228002223' id='d7de46adb8fd07a93a790e19138d0d763f0b7360ac085521f62048592488c499'
time="2022-12-27T17:22:24-07:00" level=debug msg="version.Check: http status = 200 OK" app=docker-slim
time="2022-12-27T17:22:24-07:00" level=debug msg="RunContainer: container HostConfig.NetworkMode => default len(ports)=3" app=docker-slim command=build component=container.inspector
time="2022-12-27T17:22:24-07:00" level=debug msg="RunContainer: container NetworkSettings.Ports => map[docker.Port][]docker.PortBinding{\"3000/tcp\":[]docker.PortBinding{docker.PortBinding{HostIP:\"0.0.0.0\", HostPort:\"32820\"}}, \"65501/tcp\":[]docker.PortBinding{docker.PortBinding{HostIP:\"0.0.0.0\", HostPort:\"32819\"}}, \"65502/tcp\":[]docker.PortBinding{docker.PortBinding{HostIP:\"0.0.0.0\", HostPort:\"32818\"}}}" app=docker-slim command=build component=container.inspector
cmd=build info=container status='running' name='dockerslimk_13774_20221228002223' id='d7de46adb8fd07a93a790e19138d0d763f0b7360ac085521f62048592488c499'
cmd=build info=container message='obtained IP address' ip='172.17.0.3'
time="2022-12-27T17:22:24-07:00" level=debug msg=target.container.ipc.connect app=docker-slim command=build component=container.inspector container.network= in.container=false ipc.mode=proxy op=container.Inspector.initContainerChannels port.cmd=32819 port.evt=32818 target=192.168.99.100
time="2022-12-27T17:22:24-07:00" level=debug msg="ipc.NewClient(192.168.99.100,32819,32818)"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.NewClient: connect wait timeout - 1m0s"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.NewClient: net.DialTimeout(tcp,192.168.99.100:32819,15s) [time=1672186944106111000]"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Write: remote=192.168.99.100:32819 -> local=192.168.99.1:55629 - conn.Write wc=75 err=<nil> [time=1672186944106995000]"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read() - (0xc00010f260)reader.ReadString => err=<nil> raw=\"[<|]{\\\"tid\\\":\\\"1672186944106907000.52fdfc072182654f\\\",\\\"type\\\":\\\"ft.control\\\"}[|>]\\n\""
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read: got raw frame ='[<|]{\"tid\":\"1672186944106907000.52fdfc072182654f\",\"type\":\"ft.control\"}[|>]\n'"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read: frame data => tid=1672186944106907000.52fdfc072182654f type=ft.control body=''"
time="2022-12-27T17:22:24-07:00" level=debug msg="verifyCommandChannel: client.Read() (tid=1672186944106907000.52fdfc072182654f type=ft.control) result.data=''"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.NewClient: connect wait timeout - 1m0s"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.NewClient: net.DialTimeout(tcp,192.168.99.100:32818,15s) [time=1672186944108301000]"
time="2022-12-27T17:22:24-07:00" level=debug msg="ipc.Client.SendCommand() cmd channel call data='{\"name\":\"cmd.monitor.start\",\"data\":{\"rta_source_ptrace\":true,\"app_name\":\"python\",\"app_args\":[\"./helloworld.py\"],\"app_stdout_to_file\":false,\"app_stderr_to_file\":false,\"report_on_main_pid_exit\":false,\"keep_perms\":true,\"include_cert_all\":true,\"include_new\":true}}'\n"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.CommandClient.Call: calling c.Write()"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Write: remote=192.168.99.100:32819 -> local=192.168.99.1:55629 - conn.Write wc=343 err=<nil> [time=1672186944109240000]"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.CommandClient.Call: calling c.Read()"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read() - (0xc00010f260)reader.ReadString => err=<nil> raw=\"[<|]{\\\"tid\\\":\\\"1672186944109183000.163f5f0f9a621d72\\\",\\\"type\\\":\\\"ft.response\\\",\\\"body\\\":{\\\"status\\\":\\\"ok\\\"}}[|>]\\n\""
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read: got raw frame ='[<|]{\"tid\":\"1672186944109183000.163f5f0f9a621d72\",\"type\":\"ft.response\",\"body\":{\"status\":\"ok\"}}[|>]\n'"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read: frame data => tid=1672186944109183000.163f5f0f9a621d72 type=ft.response body='{\"status\":\"ok\"}'"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.CommandClient.Call: c.Read() (tid=1672186944109183000.163f5f0f9a621d72 type=ft.response) result.data='{\"status\":\"ok\"}'"
time="2022-12-27T17:22:24-07:00" level=debug msg="ipc.Client.SendCommand() cmd channel call response='{\"status\":\"ok\"}'\n"
cmd=build info=cmd.startmonitor status='sent'
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read() - (0xc0004a10e0)reader.ReadString => err=<nil> raw=\"[<|]{\\\"tid\\\":\\\"1672186944430355124.52fdfc072182654f\\\",\\\"type\\\":\\\"ft.event\\\",\\\"body\\\":{\\\"name\\\":\\\"event.monitor.start.failed\\\",\\\"data\\\":null}}[|>]\\n\""
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read: got raw frame ='[<|]{\"tid\":\"1672186944430355124.52fdfc072182654f\",\"type\":\"ft.event\",\"body\":{\"name\":\"event.monitor.start.failed\",\"data\":null}}[|>]\n'"
time="2022-12-27T17:22:24-07:00" level=debug msg="channel.Client.Read: frame data => tid=1672186944430355124.52fdfc072182654f type=ft.event body='{\"name\":\"event.monitor.start.failed\",\"data\":null}'"
time="2022-12-27T17:22:24-07:00" level=debug msg="ipc.Client.GetEvent(): channel.Recv() - done [tid=1672186944430355124.52fdfc072182654f evt={\"name\":\"event.monitor.start.failed\",\"data\":null}]\n"
cmd=build info=event.startmonitor.done status='received.unexpected' data='&{Name:event.monitor.start.failed Data:<nil>}'
cmd=build info=report file='slim.report.json'
time="2022-12-27T17:22:24-07:00" level=fatal msg="docker-slim: failure" error="unexpected event type" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x2a8f160, 0xc000432c60})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x5e\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).FailOn(0xc00024c2c0?, {0x2a8f160?, 0xc000432c60?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/execontext.go:56 +0x49\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand(_, _, {_, _}, _, {_, _}, {_, _}, {0x0, ...}, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/handler.go:876 +0x456b\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0xc0007c8900)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:607 +0x4730\ngithub.com/urfave/cli/v2.(*Command).Run(0x3865720, 0xc000612500)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x5dc\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc00024a000, {0x2aa85d0?, 0xc000122008}, {0xc000128000, 0x5, 0x5})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0xb7d\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:224\ngithub.com/docker-slim/docker-slim/pkg/app/master.Run()\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/app.go:15 +0x46\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/docker-slim/main.go:15 +0x18e\n" version="darwin|Transformer|1.39.0|latest|latest"
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
Start with the docker-slim build command and the failure path reported at pkg/app/master/commands/build/handler.go:876, using the provided Python Flask image and Docker/macOS versions to reproduce the unexpected event. Trace the container inspection and start-monitor events in the debug output; done means the image builds successfully or the failure is reported with a clear, actionable cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, python
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100