Scrapy-Splash: Failed to run docker container with scrapinghub/splash:latest as base image











up vote
0
down vote

favorite












Am building a python Scrapy application which uses some Azure Services and Scrapy-Splash. I tried creating a docker image for my application with scrapinghub/splash:latest as base image in my local windows machine.

Below is the Dockerfile am using,



FROM scrapinghub/splash:latest
WORKDIR /usr/src/snapshot

ADD requirements.txt ./
RUN pip install -r requirements.txt

ADD . ./

EXPOSE 8888 80

ENTRYPOINT ["/usr/src/snapshot/init_container.sh"]


The init_container.sh file has the statement to run the application, python /usr/src/snapshot/SiteCrawler.py.

Now when I run the docker image with the command docker run testsnapshot:0.1, the application starts and stops due to import error, ImportError: No module named azure.servicebus



I tried creating a docker image of the application with python:3.6.6 as base image, it works fine.



The application build the docker image and installs the packages from requirements.txt correctly.
Attaching below my requirements.txt content



asn1crypto==0.24.0
attrs==18.2.0
Automat==0.7.0
azure-common==1.1.16
azure-nspkg==3.0.2
azure-servicebus==0.21.1
azure-storage==0.36.0
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
constantly==15.1.0
cryptography==2.3.1
cssselect==1.0.3
hyperlink==18.0.0
idna==2.7
incremental==17.5.0
lxml==4.2.5
parsel==1.5.0
pip==18.0
pyasn1==0.4.4
pyasn1-modules==0.2.2
pycparser==2.19
PyDispatcher==2.0.5
PyHamcrest==1.9.0
pyOpenSSL==18.0.0
python-dateutil==2.7.3
queuelib==1.5.0
requests==2.20.0
Scrapy==1.5.1
scrapy-splash==0.7.2
service-identity==17.0.0
setuptools==39.0.1
six==1.11.0
Twisted==16.1.1
urllib3==1.24
w3lib==1.19.0
zope.interface==4.5.0









share|improve this question






















  • Got it worked. Just added VOLUME ["/usr/src/snapshot"] to Docker file. But now I face a different issue where the splash url is not accessible from my scrapy. I tried with http://127.0.0.1:8050 and http://0.0.0.0:8050
    – sadiqmc
    2 days ago

















up vote
0
down vote

favorite












Am building a python Scrapy application which uses some Azure Services and Scrapy-Splash. I tried creating a docker image for my application with scrapinghub/splash:latest as base image in my local windows machine.

Below is the Dockerfile am using,



FROM scrapinghub/splash:latest
WORKDIR /usr/src/snapshot

ADD requirements.txt ./
RUN pip install -r requirements.txt

ADD . ./

EXPOSE 8888 80

ENTRYPOINT ["/usr/src/snapshot/init_container.sh"]


The init_container.sh file has the statement to run the application, python /usr/src/snapshot/SiteCrawler.py.

Now when I run the docker image with the command docker run testsnapshot:0.1, the application starts and stops due to import error, ImportError: No module named azure.servicebus



I tried creating a docker image of the application with python:3.6.6 as base image, it works fine.



The application build the docker image and installs the packages from requirements.txt correctly.
Attaching below my requirements.txt content



asn1crypto==0.24.0
attrs==18.2.0
Automat==0.7.0
azure-common==1.1.16
azure-nspkg==3.0.2
azure-servicebus==0.21.1
azure-storage==0.36.0
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
constantly==15.1.0
cryptography==2.3.1
cssselect==1.0.3
hyperlink==18.0.0
idna==2.7
incremental==17.5.0
lxml==4.2.5
parsel==1.5.0
pip==18.0
pyasn1==0.4.4
pyasn1-modules==0.2.2
pycparser==2.19
PyDispatcher==2.0.5
PyHamcrest==1.9.0
pyOpenSSL==18.0.0
python-dateutil==2.7.3
queuelib==1.5.0
requests==2.20.0
Scrapy==1.5.1
scrapy-splash==0.7.2
service-identity==17.0.0
setuptools==39.0.1
six==1.11.0
Twisted==16.1.1
urllib3==1.24
w3lib==1.19.0
zope.interface==4.5.0









share|improve this question






















  • Got it worked. Just added VOLUME ["/usr/src/snapshot"] to Docker file. But now I face a different issue where the splash url is not accessible from my scrapy. I tried with http://127.0.0.1:8050 and http://0.0.0.0:8050
    – sadiqmc
    2 days ago















up vote
0
down vote

favorite









up vote
0
down vote

favorite











Am building a python Scrapy application which uses some Azure Services and Scrapy-Splash. I tried creating a docker image for my application with scrapinghub/splash:latest as base image in my local windows machine.

Below is the Dockerfile am using,



FROM scrapinghub/splash:latest
WORKDIR /usr/src/snapshot

ADD requirements.txt ./
RUN pip install -r requirements.txt

ADD . ./

EXPOSE 8888 80

ENTRYPOINT ["/usr/src/snapshot/init_container.sh"]


The init_container.sh file has the statement to run the application, python /usr/src/snapshot/SiteCrawler.py.

Now when I run the docker image with the command docker run testsnapshot:0.1, the application starts and stops due to import error, ImportError: No module named azure.servicebus



I tried creating a docker image of the application with python:3.6.6 as base image, it works fine.



The application build the docker image and installs the packages from requirements.txt correctly.
Attaching below my requirements.txt content



asn1crypto==0.24.0
attrs==18.2.0
Automat==0.7.0
azure-common==1.1.16
azure-nspkg==3.0.2
azure-servicebus==0.21.1
azure-storage==0.36.0
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
constantly==15.1.0
cryptography==2.3.1
cssselect==1.0.3
hyperlink==18.0.0
idna==2.7
incremental==17.5.0
lxml==4.2.5
parsel==1.5.0
pip==18.0
pyasn1==0.4.4
pyasn1-modules==0.2.2
pycparser==2.19
PyDispatcher==2.0.5
PyHamcrest==1.9.0
pyOpenSSL==18.0.0
python-dateutil==2.7.3
queuelib==1.5.0
requests==2.20.0
Scrapy==1.5.1
scrapy-splash==0.7.2
service-identity==17.0.0
setuptools==39.0.1
six==1.11.0
Twisted==16.1.1
urllib3==1.24
w3lib==1.19.0
zope.interface==4.5.0









share|improve this question













Am building a python Scrapy application which uses some Azure Services and Scrapy-Splash. I tried creating a docker image for my application with scrapinghub/splash:latest as base image in my local windows machine.

Below is the Dockerfile am using,



FROM scrapinghub/splash:latest
WORKDIR /usr/src/snapshot

ADD requirements.txt ./
RUN pip install -r requirements.txt

ADD . ./

EXPOSE 8888 80

ENTRYPOINT ["/usr/src/snapshot/init_container.sh"]


The init_container.sh file has the statement to run the application, python /usr/src/snapshot/SiteCrawler.py.

Now when I run the docker image with the command docker run testsnapshot:0.1, the application starts and stops due to import error, ImportError: No module named azure.servicebus



I tried creating a docker image of the application with python:3.6.6 as base image, it works fine.



The application build the docker image and installs the packages from requirements.txt correctly.
Attaching below my requirements.txt content



asn1crypto==0.24.0
attrs==18.2.0
Automat==0.7.0
azure-common==1.1.16
azure-nspkg==3.0.2
azure-servicebus==0.21.1
azure-storage==0.36.0
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
constantly==15.1.0
cryptography==2.3.1
cssselect==1.0.3
hyperlink==18.0.0
idna==2.7
incremental==17.5.0
lxml==4.2.5
parsel==1.5.0
pip==18.0
pyasn1==0.4.4
pyasn1-modules==0.2.2
pycparser==2.19
PyDispatcher==2.0.5
PyHamcrest==1.9.0
pyOpenSSL==18.0.0
python-dateutil==2.7.3
queuelib==1.5.0
requests==2.20.0
Scrapy==1.5.1
scrapy-splash==0.7.2
service-identity==17.0.0
setuptools==39.0.1
six==1.11.0
Twisted==16.1.1
urllib3==1.24
w3lib==1.19.0
zope.interface==4.5.0






python docker scrapy azureservicebus scrapy-splash






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 8 at 8:33









sadiqmc

5611




5611












  • Got it worked. Just added VOLUME ["/usr/src/snapshot"] to Docker file. But now I face a different issue where the splash url is not accessible from my scrapy. I tried with http://127.0.0.1:8050 and http://0.0.0.0:8050
    – sadiqmc
    2 days ago




















  • Got it worked. Just added VOLUME ["/usr/src/snapshot"] to Docker file. But now I face a different issue where the splash url is not accessible from my scrapy. I tried with http://127.0.0.1:8050 and http://0.0.0.0:8050
    – sadiqmc
    2 days ago


















Got it worked. Just added VOLUME ["/usr/src/snapshot"] to Docker file. But now I face a different issue where the splash url is not accessible from my scrapy. I tried with http://127.0.0.1:8050 and http://0.0.0.0:8050
– sadiqmc
2 days ago






Got it worked. Just added VOLUME ["/usr/src/snapshot"] to Docker file. But now I face a different issue where the splash url is not accessible from my scrapy. I tried with http://127.0.0.1:8050 and http://0.0.0.0:8050
– sadiqmc
2 days ago



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203995%2fscrapy-splash-failed-to-run-docker-container-with-scrapinghub-splashlatest-as%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203995%2fscrapy-splash-failed-to-run-docker-container-with-scrapinghub-splashlatest-as%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff