Skip to content
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

Error when using podman with hadolint image #691

Closed
1 of 3 tasks
tschm opened this issue Aug 23, 2021 · 5 comments
Closed
1 of 3 tasks

Error when using podman with hadolint image #691

tschm opened this issue Aug 23, 2021 · 5 comments

Comments

@tschm
Copy link

tschm commented Aug 23, 2021

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

Actual behavior

Hadolint hangs as the image doesn't seem to return anything when used with podman

Steps to reproduce the behavior

Use any Dockerfile and

podman run --rm -i docker.io/hadolint/hadolint:2.6.0-debian < .

@tschm
Copy link
Author

tschm commented Aug 23, 2021

This may help: containers/podman#3323

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf

Use any Dockerfile and

podman run --rm -i docker.io/hadolint/hadolint:2.6.0-debian < .

This does not work on my Docker hosts either, meaning if I run your thing in Docker, it does not return anything, too, same as podman.

I believe what you might have meant to do with the command is to pass it just the Dockerfile instead of whole ., like so:
podman run --rm -i docker.io/hadolint/hadolint:2.6.0-debian < Dockerfile

For the record, the above works with both Docker version 20.10.8, build 3967b7d28e and podman version 3.3.1.

@0uep
Copy link
Contributor

0uep commented Oct 1, 2021

Hi @tschm

I also use Podman. The following script hadolint is in my $PATH and runs the current downloaded image docker.io/hadolint/hadolint:

#!/bin/bash
dockerfile="$1"
shift
podman run --rm -i docker.io/hadolint/hadolint hadolint "$@" - < "$dockerfile"

This script hadolint need to be used in this way:

hadolint path/to/your/Dockerfile [OPTIONS]

I sometimes upgrade my local image docker.io/hadolint/hadolint:

podman pull docker.io/hadolint/hadolint

I think this a good way to securely rum Hadolint with upgrade ease.

Moreover, this script works fine with the current version of the extension vscode-hadolint
https://github.com/michaellzc/vscode-hadolint

Note: I also use vscodium.com + open-vsx.org

@0uep
Copy link
Contributor

0uep commented Oct 1, 2021

Hi @lorenzo

Would you mind if the README explains how to use Hadolint with Podman?
You may also share the tips from my previous message.

Thank you for maintaining Hadolint. 😄

@lorenzo
Copy link
Member

lorenzo commented Oct 1, 2021

Your contribution will be very welcomed @0uep :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants