-
Notifications
You must be signed in to change notification settings - Fork 502
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
Adding a Dockerfile and updated README with instructions to run using docker #937
base: main
Are you sure you want to change the base?
Conversation
I just now noticed the Dockerfile in https://github.com/puppetlabs/showoff/blob/main/build/Dockerfile. Please let me know if I need to amend the commits to remove it. I think the README instructions on how to build it are helpful, but may need to be updated to point to the build folder. |
I tried building with the already-committed Dockerfile in the build directory, and I am getting build errors. Since the Dockerfile I rebuilt seems to produce a functional showoff binary, I'm wondering if we want to replace build/Dockerfile with the one that I put in the root of the repository. Here are the build errors from building from the build folder:
|
README.md
Outdated
|
||
Or build the image yourself: | ||
|
||
docker build -t Dockerfile local/showoff . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I just stumbled upon this project and thankfully over your Merge Request.
I did try out your Dockerfile. It works like a charm. The "old" Dockerfile doesn't work for me, I run into the exact same error as you mentioned above.
There is an error though in this line, the flag "-f" is missing. The following would be correct:
docker build -f Dockerfile -t local/showoff .
I would also suggest overwriting the Dockerfile under build/Dockerfile as you mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lvoss Glad you found this helpful.
As for the -f flag, I may be missing something, but I believe the default value of -f is "Dockerfile" and that -f is only needed if using a name other than "Dockerfile". I'd be interested to see the error you're getting if you're not able to build without the -f flag and the file is named "Dockerfile". Are you using the latest version of the docker CLI?
And as for where to put this Dockerfile, I'm waiting to hear what the maintainer wants to do. I agree replacing the build/Dockerfile may be best, since it doesn't appear to be working properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, now I see what the problem is. I have the -t
in the wrong place. I'll fix it. Thanks for catching it. Apparently, I was missing something.
Another sidenote, which may be relevant for the Readme: I just noticed that you should mount the /example/ folder instead of the full project folder in order for the images to load. docker run --rm -it -p 9090:9090 -v $(pwd)/example:/var/cache/showoff local/showoff Edit: nevermind, running the container in the example-folder ruins the print-functionality. |
I experienced the issue described here #928 (comment) when using the docker image. It seems the version of Showoff in the docker image is one version behind, from approximately 2 years ago, and it has a bug where images won't render in the presentations.
I couldn't find the Dockerfile, so I rebuilt it and included it here with instructions to build the image locally. It would be awesome if we can update the Docker image on Docker Hub, but in the meantime, folks can rebuild the image locally if they want to run with docker.
I checked the examples. From what I can tell, everything works. I'm new to Showoff, so I wasn't sure what I was supposed to see with the "executable code" slides. Hope this helps!