GithubHelp home page GithubHelp logo

dockerfilelint-precommit-hooks's People

Stargazers

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

Watchers

 avatar

Forkers

zombig sethmdoty

dockerfilelint-precommit-hooks's Issues

Installing dockerfilelint-precommit-hooks fails on ARM64 (aarch)

I tried a configuration that worked on x86_64. On my arm64v8 board "Rock 4SE" it fails (se output at bottom).
I'm not sure on what project I should write this report, but I start with this one.

$ uname -a
Linux rockpi-4b 5.15.93-rockchip64 #23.02.2 SMP PREEMPT Fri Feb 17 23:48:36 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

When disabling dockerfilelint-precommit-hooks the rest of the plugins installed correctly.

+    # - repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
+    #   rev: v0.1.0
+    #   hooks:
+    #       - id: dockerfilelint

Output in ~/.cache/pre-commit/pre-commit.log follows:

version information

pre-commit version: 2.17.0
git --version: git version 2.34.1
sys.version:
    3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0]
sys.executable: /usr/bin/python3
os.name: posix
sys.platform: linux

error information

An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/python3', '-mnodeenv', '--prebuilt', '--clean-src', '/home/username/.cache/pre-commit/repoyi3au1yz/node_env-default')
return code: 1
expected return code: 0
stdout: (none)
stderr:
     * Install node (20.4.0Traceback (most recent call last):
      File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 1042, in <module>
        main()
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 890, in main
        create_environment(env_dir, opt)
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 731, in create_environment
        install_node(env_dir, src_dir, opt)
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 594, in install_node
        node_url = get_node_src_url(opt.node, get_node_src_url_postfix(opt))
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 503, in get_node_src_url_postfix
        postfix_arch = arches[platform.machine()]
    KeyError: 'aarch64'

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pre_commit/error_handler.py", line 70, in error_handler
    yield
  File "/usr/lib/python3/dist-packages/pre_commit/main.py", line 396, in main
    return run(args.config, store, args)
  File "/usr/lib/python3/dist-packages/pre_commit/commands/run.py", line 416, in run
    install_hook_envs(to_install, store)
  File "/usr/lib/python3/dist-packages/pre_commit/repository.py", line 224, in install_hook_envs
    _hook_install(hook)
  File "/usr/lib/python3/dist-packages/pre_commit/repository.py", line 82, in _hook_install
    lang.install_environment(
  File "/usr/lib/python3/dist-packages/pre_commit/languages/node.py", line 97, in install_environment
    cmd_output_b(*cmd)
  File "/usr/lib/python3/dist-packages/pre_commit/util.py", line 154, in cmd_output_b
    raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/usr/bin/python3', '-mnodeenv', '--prebuilt', '--clean-src', '/home/username/.cache/pre-commit/repoyi3au1yz/node_env-default')
return code: 1
expected return code: 0
stdout: (none)
stderr:
     * Install node (20.4.0Traceback (most recent call last):
      File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 1042, in <module>
        main()
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 890, in main
        create_environment(env_dir, opt)
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 731, in create_environment
        install_node(env_dir, src_dir, opt)
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 594, in install_node
        node_url = get_node_src_url(opt.node, get_node_src_url_postfix(opt))
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 503, in get_node_src_url_postfix
        postfix_arch = arches[platform.machine()]
    KeyError: 'aarch64'

Dockerfile linter....................................(no files to check)Skipped

Is this repo being maintained ?

My repo structure is

โœ— ls -tlrh
total 40
drwxr-xr-x  3 user  staff    96B 11 Oct 14:00 test
-rw-r--r--  1 user  staff    12B 11 Oct 15:27 README.md
-rw-r--r--  1 user  staff   224B 11 Oct 15:36 test.yaml
-rw-r--r--  1 user  staff   583B 11 Oct 15:36 test.json
-rw-r--r--  1 user  staff   3.0K 11 Oct 15:44 Dockerfile

My .pre-commit-hooks.yaml states

- id: dockerfilelint
  name: Dockerfile linter
  entry: dockerfilelint
  language: node
  additional_dependencies: [dockerfilelint]
  files: Dockerfile.*

My .pre-commit-config.yaml files states

- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
  sha: master
  hooks:
  - id: dockerfilelint

When I run pre-commit clean; pre-commit run -a , i get

[WARNING] Unexpected key(s) present on https://github.com/pryorda/dockerfilelint-precommit-hooks: sha
[INFO] Initializing environment for https://github.com/pryorda/dockerfilelint-precommit-hooks:dockerfilelint.
[INFO] Installing environment for https://github.com/pryorda/dockerfilelint-precommit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Dockerfile linter....................................(no files to check)Skipped

Is there something Ive missed ?

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.