mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[build] Migrate linux_exe to static musl builds (#9811)
				
					
				
			Authored by: Grub4K, bashonly Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										10
									
								
								bundle/docker/compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								bundle/docker/compose.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| services: | ||||
|   static: | ||||
|     build: static | ||||
|     environment: | ||||
|       channel: ${channel} | ||||
|       origin: ${origin} | ||||
|       version: ${version} | ||||
|     volumes: | ||||
|       - ~/build:/build | ||||
|       - ../..:/yt-dlp | ||||
							
								
								
									
										21
									
								
								bundle/docker/static/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								bundle/docker/static/Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| FROM alpine:3.19 as base | ||||
|  | ||||
| RUN apk --update add --no-cache \ | ||||
|         build-base \ | ||||
|         python3 \ | ||||
|         pipx \ | ||||
|     ; | ||||
|  | ||||
| RUN pipx install pyinstaller | ||||
| # Requires above step to prepare the shared venv | ||||
| RUN ~/.local/share/pipx/shared/bin/python -m pip install -U wheel | ||||
| RUN apk --update add --no-cache \ | ||||
|         scons \ | ||||
|         patchelf \ | ||||
|         binutils \ | ||||
|     ; | ||||
| RUN pipx install staticx | ||||
|  | ||||
| WORKDIR /yt-dlp | ||||
| COPY entrypoint.sh /entrypoint.sh | ||||
| ENTRYPOINT /entrypoint.sh | ||||
							
								
								
									
										13
									
								
								bundle/docker/static/entrypoint.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								bundle/docker/static/entrypoint.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| #!/bin/ash | ||||
| set -e | ||||
|  | ||||
| source ~/.local/share/pipx/venvs/pyinstaller/bin/activate | ||||
| python -m devscripts.install_deps --include secretstorage | ||||
| python -m devscripts.make_lazy_extractors | ||||
| python devscripts/update-version.py -c "${channel}" -r "${origin}" "${version}" | ||||
| python -m bundle.pyinstaller | ||||
| deactivate | ||||
|  | ||||
| source ~/.local/share/pipx/venvs/staticx/bin/activate | ||||
| staticx /yt-dlp/dist/yt-dlp_linux /build/yt-dlp_linux | ||||
| deactivate | ||||
		Reference in New Issue
	
	Block a user
	 Simon Sawicki
					Simon Sawicki