This file contains 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 ubuntu:14.04 | |
MAINTAINER likang | |
#instalando python e scrapy | |
RUN apt-get update | |
RUN apt-get install -y python python-pip python-dev libxml2-dev libxslt-dev libffi-dev libssl-dev | |
RUN pip install lxml && pip install pyopenssl && pip install Scrapy && pip install service_identity | |
#instalando o git | |
RUN apt-get install -y git |
This file contains 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
sudo docker build -t scrapy . |
This file contains 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
Sending build context to Docker daemon 98.3 kB | |
Sending build context to Docker daemon | |
Step 0 : FROM ubuntu:14.04 | |
---> 2d24f826cb16 | |
Step 1 : MAINTAINER likang | |
---> Using cache | |
---> 20b513cdff4a | |
Step 2 : RUN apt-get update | |
---> Using cache | |
---> 0b7c32020c8d |
This file contains 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
sudo docker run -d scrapy |
This file contains 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
$ sudo docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
cac0e1987b5d scrapy:latest "scrapy crawl java ' 7 seconds ago Up 6 seconds jolly_hopper |
This file contains 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
$ sudo docker logs -f cac0e1987b5d | |
2015-03-11 19:44:24+0000 [scrapy] INFO: Scrapy 0.24.5 started (bot: guj) | |
2015-03-11 19:44:24+0000 [scrapy] INFO: Optional features available: ssl, http11 | |
2015-03-11 19:44:24+0000 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'guj.spiders', 'REDIRECT_MAX_TIMES': 5, 'FEED_URI': ' items.json', 'SPIDER_MODULES': ['guj.spiders'], 'BOT_NAME': 'guj', 'TELNETCONSOLE_ENABLED': False, 'FEED_FORMAT': 'json', 'DOWNLOAD_DELAY': 600} | |
2015-03-11 19:44:24+0000 [scrapy] INFO: Enabled extensions: FeedExporter, LogStats, CloseSpider, WebService, CoreStats, SpiderState | |
2015-03-11 19:44:24+0000 [scrapy] INFO: Enabled downloader middlewares: HttpAuthMiddleware, DownloadTimeoutMiddleware, UserAgentMiddleware, RetryMiddleware, DefaultHeadersMiddleware, MetaRefreshMiddleware, HttpCompressionMiddleware, RedirectMiddleware, CookiesMiddleware, ChunkedTransferMiddleware, DownloaderStats | |
2015-03-11 19:44:24+0000 [scrapy] INFO: Enabled spider middlewares: HttpErrorMiddleware, OffsiteMiddleware, |
This file contains 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
$ sudo docker logs -f cac0e1987b5d |
This file contains 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
#Kill all running containers | |
docker kill $(docker ps -q) | |
#Delete all stopped containers | |
docker rm $(docker ps -a -q) | |
#Delete all ‘untagged/dangling’ (<none>) images |
This file contains 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
#change in image: kaixhin/cuda-caffe | |
pip install --upgrade pip | |
pip install numpy --user | |
sudo apt-get install python-scipy | |
make pycaffe | |
apt-get install vim | |
wget http://dl.caffe.berkeleyvision.org/bvlc_reference_caffenet.caffemodel | |
# run image | |
docker run --name caffe -ti kaixhin/cuda-caffe bash |
This file contains 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
- Make one example with TDD. | |
- One example with channel | |
- One example with goroutines | |
- Demostrate tag unit / integration tests | |
- example with pointer / slice | |
- rabbit consume example with channel |
OlderNewer