slimtoolkit / examples Goto Github PK
View Code? Open in Web Editor NEWMinified application examples with different languages and stacks for DockerSlim
Home Page: https://dockersl.im
License: Apache License 2.0
Minified application examples with different languages and stacks for DockerSlim
Home Page: https://dockersl.im
License: Apache License 2.0
I have build an image using this repo ,and then try to docker-slim build the image, but I get below error
docker-slim build --target dslimexamples/java-dropwizard-standard:latest --tag dslimexamples/java-dropwizard-standard:slim
time="2022-10-02T22:57:15-04:00" level=fatal msg="docker-slim: failure" error="API error (400): failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: \"/opt/dockerslim/bin/docker-slim-sensor\": stat /opt/dockerslim/bin/docker-slim-sensor: no such file or directory: unknown" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x64\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x104b08a00, 0x140000b67c8})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x38\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).FailOn(0x14000186840?, {0x104b08a00?, 0x140000b67c8?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/execontext.go:56 +0x44\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand(_, _, {_, _}, _, _, _, _, _, _, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/handler.go:1063 +0x4e34\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0x140002f3dc0)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:694 +0x3c88\ngithub.com/urfave/cli/v2.(*Command).Run(0x1050c7ba0, 0x1400010db80)\n\tgithub.com/urfave/cli/[email protected]/command.go:163 +0x4fc\ngithub.com/urfave/cli/v2.(*App).RunContext(0x14000501a00, {0x104b104d0?, 0x140000380a0}, {0x140000301e0, 0x6, 0x6})\n\tgithub.com/urfave/cli/[email protected]/app.go:313 +0x860\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/[email protected]/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 +0x4c\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/docker-slim/main.go:15 +0x1c4\n" version="darwin|Transformer|1.38.0|latest|latest"
https://github.com/docker-slim/examples/tree/master/aws-node-express-api-docker
response output:
POST /stuff {"statusCode":400,"headers":{"x-powered-by":"Express","content-security-policy":"default-src 'none'","x-content-type-options":"nosniff","content-type":"text/html; charset=utf-8","content-length":"138"},"isBase64Encoded":false,"body":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Bad Request</pre>\n</body>\n</html>\n"}
server log output:
START RequestId: 4d989d5b-39c2-41c8-8c2c-bde5e412e71d Version: $LATEST at read (/var/task/node_modules/body-parser/lib/read.js:77:3)2)ex.js:127:23)Error: Cannot find module '../encodings' END RequestId: 4d989d5b-39c2-41c8-8c2c-bde5e412e71d
I am attempting to get docker to slim down my github actions runner.
When the GitHub actions runs it runs this code:
while :;
do
cp -f "$DIR"/run-helper.sh.template "$DIR"/run-helper.sh
"$DIR"/run-helper.sh $* &
PID=$!
wait -f $PID
returnCode=$?
if [[ $returnCode -eq 2 ]]; then
echo "Restarting runner..."
else
echo "Exiting runner..."
# Unregister signal handling before exit
trap - INT TERM
# wait for last parts to be logged
wait $PID
exit $returnCode
fi
done
}
Essentially this copies run-helper.sh.template to run-helper.sh
However when I run this using slim build it fails to cp the file.
I have ran this with the option --run-target-as-user --keep-perms as the runner is running under the user 'runner'. However this doesn't change the outcome.
Any thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.