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

Upgrade ubuntu image to 24.04 (LTS), alpine to 320 and ffmpeg to 7.1 #408

Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
af98e79
fix dockerfile template for ubuntu point at correct base 'ubuntu:22.04'
jsheffie Oct 3, 2024
4265cdc
got '7.1-ubuntu' 'docker-images/7.1/ubuntu2404' to build with no 'vul…
jsheffie Oct 4, 2024
077ae5f
notes:
jsheffie Oct 4, 2024
c620353
updates
jsheffie Oct 8, 2024
6acdaa0
update build to support ffmpeg libs for newer versions
jsheffie Oct 8, 2024
3a03055
updates
jsheffie Oct 8, 2024
dea29c8
read_ffmpeg_template_content_based_on_version
jsheffie Oct 8, 2024
3072aa1
code cleanup
jsheffie Oct 8, 2024
d0b4454
renaming function for readibility
jsheffie Oct 8, 2024
25f0f59
clean up to build the latest OS's
jsheffie Oct 10, 2024
e15e9e9
builder updates: ubuntu2404 and alpine320 are working
jsheffie Oct 11, 2024
7bcd805
incremental checkin got 'ubuntu2404' working again
jsheffie Oct 16, 2024
8041199
updates
jsheffie Oct 16, 2024
7527022
updates
jsheffie Oct 16, 2024
174ca6d
incremental
jsheffie Oct 17, 2024
1cf5054
got the ubuntu2404 image going, and down to 200 megs
jsheffie Oct 17, 2024
552d2f5
work in progress
jsheffie Oct 20, 2024
0c65fc6
incremental commit ( working through pre-commit )
jsheffie Oct 21, 2024
51f1527
fixing pre-commit
jsheffie Oct 21, 2024
6a36ea2
image 'ffmpeg-7.1-ubuntu2404' is working again
jsheffie Oct 22, 2024
d3baed4
incremental checkin 'ubuntu2404', 'ubuntu2404-edge' are working and '…
jsheffie Oct 24, 2024
22ceeed
working out alpine320 and alpine scratch
jsheffie Oct 25, 2024
1e8924d
updates to the alpine scratch320 build
jsheffie Oct 25, 2024
9378439
linting
jsheffie Oct 25, 2024
13aec77
getting close
jsheffie Oct 25, 2024
10781bc
working scratch320
jsheffie Oct 26, 2024
1df1c01
fix readme
jsheffie Oct 26, 2024
7f98563
README.md fixes
jsheffie Oct 26, 2024
c81177a
do multi stage build for alpine320
jsheffie Oct 26, 2024
401f7e2
code review cleanup
jsheffie Oct 27, 2024
fe8b066
remove docker-images ( added to .gitignore) there were 167 files to r…
jsheffie Oct 27, 2024
63a968c
reverting docker-images
jsheffie Oct 27, 2024
fd2570b
revert docker-images dir
jsheffie Oct 27, 2024
753c8d5
properly handle building 'ffmpeg-<ver>' and add ffmpeg-5.1 to SKIP_VA…
jsheffie Oct 27, 2024
a0e281c
cleanup readme
jsheffie Oct 27, 2024
dad192d
pre-commit enforced
jrottenberg Oct 28, 2024
171e94e
fixing pre-commit error
jsheffie Oct 28, 2024
7c27d2a
fixing 'alpine320' build
jsheffie Oct 28, 2024
021e38f
fixing 'alpine320' 'install_ffmpeg.sh' for the build
jsheffie Oct 28, 2024
4bc420a
re-add the 'docker-images' files (pre code review feedback)
jsheffie Oct 28, 2024
b84de55
re-sync w/ upstream
jsheffie Oct 29, 2024
92b7cec
added --enable-libharfbuzz
jsheffie Nov 4, 2024
53228e8
take nvidia and scratch builds out for ffmpeg 6.1 (took over an hour …
jsheffie Nov 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
read_ffmpeg_template_content_based_on_version
  • Loading branch information
jsheffie committed Oct 8, 2024
commit dea29c86b208399c667c0a6d6bccaef9f3f49fe8
43 changes: 22 additions & 21 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,30 @@ def get_major_version(version):

print("Preparing docker images for ffmpeg versions: ")

def version_number_greater_than(major, minor, current_version):
major_number = int(current_version.split(".")[0])
minor_number = int(current_version.split(".")[1])
if major_number > major:
return True
elif major_number == major and minor_number >= minor:
return True
return False

def read_ffmpeg_template_content_based_on_version(current_version, env_or_run="env"):
""" if the version is 7.1 or later then use the updated ffmpeg templates """
updated_templates = version_number_greater_than(7, 1, current_version)
if updated_templates:
with open(f"templates/Dockerfile-{env_or_run}-ffmpeg-7.1-plus", "r") as tmpfile:
return tmpfile.read()
else:
with open(f"templates/Dockerfile-{env_or_run}", "r") as tmpfile:
return tmpfile.read()

for version in keep_version:
print(version)
# if the version is 7 or greater then use the ffmepeg-7 template
# this gives us the ability to update libs without breaking all of the older versions
use_updated_ffmpeg_templates = False
major_number = int(version.split(".")[0])
minor_number = int(version.split(".")[1])
if major_number > 7:
use_updated_ffmpeg_templates = True
elif major_number == 7 and minor_number >= 1:
use_updated_ffmpeg_templates = True

if use_updated_ffmpeg_templates:
with open(f"templates/Dockerfile-env-ffmpeg-7.1-plus", "r") as tmpfile:
ENV_CONTENT = tmpfile.read()
with open(f"templates/Dockerfile-run-ffmpeg-7.1-plus", "r") as tmpfile:
RUN_CONTENT = tmpfile.read()
else:
# Set the default env/run environments ( for older builds )
with open("templates/Dockerfile-env", "r") as tmpfile:
ENV_CONTENT = tmpfile.read()
with open("templates/Dockerfile-run", "r") as tmpfile:
RUN_CONTENT = tmpfile.read()

ENV_CONTENT = read_ffmpeg_template_content_based_on_version(version, "env")
RUN_CONTENT = read_ffmpeg_template_content_based_on_version(version, "run")

skip_variants = None
for k, v in SKIP_VARIANTS.items():
Expand Down