cisagov / cyhy-core

Core code for Cyber Hygiene (CyHy)
Other
8 stars 10 forks source link

Geoipupdate.sh error #96

Closed jeffkause closed 5 months ago

jeffkause commented 5 months ago

🐛 Summary

While creating a new docker image, geoipupdate.sh is failing due to a MaxMind error.

To reproduce

Steps to reproduce the behavior:

  1. Running ./generate_cyhy_docker_image.sh --maxmind-key <key>, results in in the following error:
ERROR [15/18] RUN var/geoipupdate.sh full (key)                                                                                        0.4s
------                                                                                                                                                  
 > [15/18] RUN var/geoipupdate.sh full (key):                                                                                                    
0.200   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                   
0.202                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
0.331 
0.331 gzip: stdin: unexpected end of file
0.331 tar: Child returned status 1
0.331 tar: Error is not recoverable: exiting now
------

ERROR: failed to solve: process "/bin/sh -c var/geoipupdate.sh $maxmind_license_type $maxmind_license_key" did not complete

Expected behavior

We would have expected to successfully create a new docker image.

Notes

@dav3r observed that this was failing due to a HTTP 302 response when attempting to fetch the database tarball via curl. Adding the --location flag to the curl command remedies the problem.