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

Missing gnutls in Docker #277

Closed
BGarber42 opened this issue Nov 5, 2021 · 3 comments · Fixed by #278
Closed

Missing gnutls in Docker #277

BGarber42 opened this issue Nov 5, 2021 · 3 comments · Fixed by #278
Assignees
Labels
area/docker bug Something isn't working estimate/4h Need 4 hours to be done

Comments

@BGarber42
Copy link

Describe the bug

Missing curl gnutls library when using docker

How can we reproduce it?

docker build -t pre-commit --build-arg INSTALL_ALL=true .
docker run -v $(pwd):/lint -w /lint pre-commit run -a
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/git', 'fetch', 'origin', '--tags')
return code: 128
expected return code: 0
stdout: (none)
stderr:
    /usr/lib/git-core/git-remote-https: error while loading shared libraries: libcurl-gnutls.so.4: cannot open shared object file: No such file or directory

Check the log at /root/.cache/pre-commit/pre-commit.log

Environment information

  • OS: Windows 10
  • docker info:
command output
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Build with BuildKit (Docker Inc., v0.6.3)
  compose: Docker Compose (Docker Inc., v2.0.0)
  scan: Docker Scan (Docker Inc., v0.8.0)

Server:
 Containers: 56
  Running: 0
  Paused: 0
  Stopped: 56
 Images: 33
 Server Version: 20.10.8
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e25210fe30a0a703442421b0f60afac609f950a3
 runc version: v1.0.1-0-g4144b63
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.4.72-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 24.97GiB
 Name: docker-desktop
 ID: TFCJ:LWUR:GNVJ:X6YP:JZAE:J2V7:7GFL:JAJ3:5H2Y:L24I:AITX:SXMP
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
  • Docker image tag/git commit:

  • Tools versions. Don't forget to specify right tag in command -
    TAG=latest && docker run --entrypoint cat pre-commit:$TAG /usr/bin/tools_versions_info

pre-commit 2.15.0
Terraform v1.0.10
checkov 2.0.549
Infracost v0.9.12
terraform-docs version v0.16.0 1f686b1 linux/amd64
terragrunt version v0.35.6
terrascan version: v1.12.0
TFLint version 0.33.1
tfsec 0.58.15
  • .pre-commit-config.yaml:
file content
INSERT_FILE_CONTENT_HERE
@BGarber42 BGarber42 added area/docker bug Something isn't working labels Nov 5, 2021
@MaxymVlasov MaxymVlasov self-assigned this Nov 6, 2021
@MaxymVlasov
Copy link
Collaborator

Bug confirmed

@MaxymVlasov MaxymVlasov added estimate/1h Need 1 hour to be done estimate/4h Need 4 hours to be done and removed estimate/1h Need 1 hour to be done labels Nov 6, 2021
@MaxymVlasov
Copy link
Collaborator

@BGarber42 please check that the docker image in the docker_to_alpine branch works fine for you.

git clone git@github.com:antonbabenko/pre-commit-terraform.git
cd pre-commit-terraform
git checkout docker_to_alpine
# Install the latest versions of all the tools
docker build -t pre-commit --build-arg INSTALL_ALL=true .

@BGarber42
Copy link
Author

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docker bug Something isn't working estimate/4h Need 4 hours to be done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants