Skip to content

Instantly share code, notes, and snippets.

@ibnesayeed
Created June 11, 2016 00:01
Show Gist options
  • Select an option

  • Save ibnesayeed/d9a2616c391364c36d612301c4689389 to your computer and use it in GitHub Desktop.

Select an option

Save ibnesayeed/d9a2616c391364c36d612301c4689389 to your computer and use it in GitHub Desktop.
An example to illustrate basic Dockerization
FROM python
MAINTAINER Sawood Alam <@ibnesayeed>
RUN pip install beautifulsoup4
RUN pip install requests
ADD main.py /app/
WORKDIR /app
RUN chmod a+x main.py
ENTRYPOINT ["./main.py"]
#!/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