Skip to content

Instantly share code, notes, and snippets.

@jgwill
Created December 13, 2022 03:56
Show Gist options
  • Save jgwill/e272c2f3dc8f5a2d8e083852afa47f0e to your computer and use it in GitHub Desktop.
Save jgwill/e272c2f3dc8f5a2d8e083852afa47f0e to your computer and use it in GitHub Desktop.
Extract what apt package are in the Dockerfile
cat Dockerfile.tmp | \
sed 's/\# RUN/#ABC/g' | \
sed 's/\#RUN/#ABC/g'| awk '/RUN apt/' | \
sed 's/RUN apt-get -y install//g' | \
sed 's/RUN apt-get install -y//g' | \
awk '/RUN apt/' | \
sed 's/RUN apt -y install//g' | \
sed 's/RUN apt install -y//g' | \
sed 's/--fix-missing//g'
##>> Dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment