Skip to content

grumpy docker image #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alanjds opened this issue Aug 21, 2018 · 0 comments
Open

grumpy docker image #16

alanjds opened this issue Aug 21, 2018 · 0 comments
Labels
imported Imported from google/grumpy

Comments

@alanjds
Copy link

alanjds commented Aug 21, 2018

google#37 opened by @S-YOU on 5 Jan 2017

Not a issue, but just sharing my grumpy docker image

https://hub.docker.com/r/syou/alpine-grumpy/

Usage

quick run by using grumprun

echo 'print "hello, world"' | docker run -i --rm \
	syou/alpine-grumpy grumprun
hello, world

run grumpy inside container

docker run -it --rm syou/alpine-grumpy sh

  • echo 'print "hello, world"' > hello.py
  • grumpc hello.py > hello.go
  • go run hello.go

hello, world

run directly by mounting host folder

cd /tmp/
echo 'print "hello, world"' > hello.py
docker run -it --rm -v $PWD:/src/app syou/alpine-grumpy \
	grumpc hello.py > hello.go
docker run -it --rm -v $PWD:/src/app syou/alpine-grumpy \
	go run hello.go
hello, world
docker run -it --rm -v $PWD:/src/app syou/alpine-grumpy \
	go build -ldflags "-extldflags -static" \
	-o hello hello.go
./hello
hello, world

Note that $PWD should be writable or use /tmp folder to write file from docker,
since final image not using root user, but you can specify --user 0 if you insist, but not recommended.

@alanjds alanjds added the imported Imported from google/grumpy label Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported Imported from google/grumpy
Projects
None yet
Development

No branches or pull requests

1 participant