- 
      
- 
        Save kielerrr/d1acf51fc13e31c7b2ba88421f757b8e to your computer and use it in GitHub Desktop. 
    Dockerize Your Projects: An example to illustrate basic Dockerization
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | FROM python | |
| LABEL maintainer="Sawood Alam <@ibnesayeed>" | |
| RUN pip install beautifulsoup4 | |
| RUN pip install requests | |
| COPY main.py /app/ | |
| WORKDIR /app | |
| RUN chmod a+x main.py | |
| ENTRYPOINT ["./main.py"] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python | |
| import sys | |
| import requests | |
| from bs4 import BeautifulSoup | |
| r = requests.get(sys.argv[-1]) | |
| data = r.text | |
| soup = BeautifulSoup(data) | |
| for link in soup.find_all("a"): | |
| print(link.get("href")) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment