mirror of
				https://github.com/Telecominfraproject/ols-nos.git
				synced 2025-10-31 01:57:48 +00:00 
			
		
		
		
	 0a36de3a89
			
		
	
	0a36de3a89
	
	
	
		
			
			* Revert "Revert "Support SONiC Reproduceable Build-debian/pip/web packages (#5718)"" This reverts commit17497a65e3. * Revert "Revert "Remove unnecessary sudo authority in build Makefile (#6237)"" This reverts commit163b7111b5.
		
			
				
	
	
		
			26 lines
		
	
	
		
			925 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			925 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
|   
 | |
| DOCKER_IMAGE=$1
 | |
| TARGET_PATH=$2
 | |
| 
 | |
| [ -z "$TARGET_PATH" ] && TARGET_PATH=./target
 | |
| 
 | |
| DOCKER_IMAGE_NAME=$(echo $DOCKER_IMAGE | cut -d: -f1)
 | |
| DOCKER_CONTAINER=$DOCKER_IMAGE_NAME
 | |
| TARGET_VERSIONS_PATH=$TARGET_PATH/versions/dockers/$DOCKER_IMAGE_NAME
 | |
| 
 | |
| [ -d $TARGET_VERSIONS_PATH ] && rm -rf $TARGET_VERSIONS_PATH
 | |
| mkdir -p $TARGET_VERSIONS_PATH
 | |
| 
 | |
| export DOCKER_CLI_EXPERIMENTAL=enabled
 | |
| 
 | |
| # Remove the old docker container if existing
 | |
| if docker container inspect $DOCKER_IMAGE > /dev/null 2>&1; then
 | |
|     docker container rm $DOCKER_IMAGE > /dev/null
 | |
| fi
 | |
| docker create --name $DOCKER_CONTAINER --entrypoint /bin/bash $DOCKER_IMAGE
 | |
| docker cp -L $DOCKER_CONTAINER:/etc/os-release $TARGET_VERSIONS_PATH/
 | |
| docker cp -L $DOCKER_CONTAINER:/usr/local/share/buildinfo/pre-versions $TARGET_VERSIONS_PATH/
 | |
| docker cp -L $DOCKER_CONTAINER:/usr/local/share/buildinfo/post-versions $TARGET_VERSIONS_PATH/
 | |
| docker container rm $DOCKER_CONTAINER
 |