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

Update base docker image to alpine 3.20 #688

Merged
merged 1 commit into from
May 29, 2024
Merged

Conversation

vladaurosh
Copy link
Contributor

As alpine linux version 3.20 is out, updating base docker image.

Updating base docker image to alpine 3.20
@jokob-sk jokob-sk merged commit 9589cfb into jokob-sk:main May 29, 2024
1 check passed
@jokob-sk
Copy link
Owner

Hey @vladaurosh , I had to rollback to 3.19 as I was getting this error:

17:29:32 [Config] ⛔ Unloading PUSHOVER

Traceback (most recent call last):

  File "<frozen runpy>", line 198, in _run_module_as_main

  File "<frozen runpy>", line 88, in _run_code

  File "/app/server/__main__.py", line 208, in <module>

    sys.exit(main())       

             ^^^^^^

  File "/app/server/__main__.py", line 168, in main

    notificationObj = notification.create(final_json, "")

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/server/notification.py", line 112, in create

    VERSIONFILE = subprocess.check_output(['php', applicationPath + '/front/php/templates/version.php']).decode('utf-8')

                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/subprocess.py", line 466, in check_output

    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/subprocess.py", line 548, in run

    with Popen(*popenargs, **kwargs) as process:

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__

    self._execute_child(args, executable, preexec_fn, close_fds,

  File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child

17:29:32 [Config] ⛔ Unloading INTRSPD

17:29:32 [Config] ⛔ Unloading DDNS

seems like PHP is not available by default?

@vladaurosh
Copy link
Contributor Author

Ah I see, they've removed softlink /usr/bin/php -> php82, for some reason. I'll fix that.

@vladaurosh
Copy link
Contributor Author

And I see why they did that. With every new php release, previous release doesn't get symlink created. Latest php version is php 8.3 .

Do you think netalertx would work with php 8.3 or needs to be 8.2?

@vladaurosh
Copy link
Contributor Author

Just did a quick test with php 8.3 and it worked, though I've noticed couple of syntax warnings:

netalertx-1  | /app/server/helper.py:391: SyntaxWarning: invalid escape sequence '\.'
netalertx-1  |   ipRegex = "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$"
netalertx-1  | /app/server/helper.py:667: SyntaxWarning: invalid escape sequence '\s'
netalertx-1  |   input = bytes_to_string(re.sub('[^a-zA-Z0-9-_\s]', '', str(input)))
netalertx-1  | /app/server/helper.py:699: SyntaxWarning: invalid escape sequence '\s'
netalertx-1  |   value = bytes_to_string(re.sub('[^a-zA-Z0-9-_\s]', '', str(input)))
20:18:29 [PHOLUS]/app/front/plugins/pholus_scan/pholus/pholus3.py:79: SyntaxWarning: invalid escape sequence '\s'
  value = b_to_str(re.sub('[^a-zA-Z0-9-_\s]', '', str(input)))
20:18:29 [PHOLUS] ⚠ ERROR - Pholus Scan - check logs
20:18:29 [PHOLUS] Scan: Pholus FAIL - check logs
20:18:29 [PHOLUS] [['eth0 192.168.1.0/24', ...
20:18:30 [Plugins] SUCCESS, received 6 entries

Hopefully this is easy to fix.

I'll make new PR.

@jokob-sk
Copy link
Owner

Thanks for the help 🙏- this seems to be a python issue - logged it and will have a look at it after the PR.

@jokob-sk
Copy link
Owner

just FYI there are some hard links to php82 if you search the source code

@vladaurosh
Copy link
Contributor Author

Wasn't able to find any references to php82 @jokob-sk
Can you send some examples?

@jokob-sk
Copy link
Owner

I can see you found them :) Thank you!

@vladaurosh
Copy link
Contributor Author

Ah, that was misunderstanding then. I thought you were referring to applicatiob source code files, not docker setup related ones.
All good then. :)

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

Successfully merging this pull request may close these issues.

2 participants