Giter Club home page Giter Club logo

slimtoolkit / examples Goto Github PK

View Code? Open in Web Editor NEW
157.0 157.0 21.0 3.48 MB

Minified application examples with different languages and stacks for DockerSlim

Home Page: https://dockersl.im

License: Apache License 2.0

Dockerfile 5.21% Shell 31.57% Elixir 6.28% Go 0.80% Java 4.66% JavaScript 4.64% PHP 0.04% Python 1.99% Ruby 30.51% Rust 0.52% Starlark 0.35% Haskell 0.21% Makefile 11.14% C# 0.44% HTML 0.19% Vue 0.78% TypeScript 0.66%
hacktoberfest

examples's People

Contributors

bigpod98 avatar c0rwin avatar edumco avatar eharris128 avatar estroz avatar imgbotapp avatar iximiuz avatar kcq avatar mritunjaysharma394 avatar mthalman avatar nathants avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

examples's Issues

DockerSlim is not working

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"

Screen Shot 2022-10-02 at 11 06 23 PM

POST request in AWS-node-express-api fails without include

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

Permission issue inside my docker container GitHub Runner

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.