Wordpress in Docker doesn’t connect to the Internet
My wordpress inside a container doesn’t connect to the Internet, so if I i.e. do an action like install a plugin, I receive an error like:
“Installation failed: An unexpected error occurred. Something may be
wrong with WordPress.org or this server’s configuration. If you
continue to have problems, please try the support forums.”.
Cam someone help me? I think it need some network options… I used docker instead of docker-compose, and run the instances with the following commands:
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7
docker run --name wordpress --link mysql -p 80:80 -d wordpress
It works, but wordpress don’t reach Internet.
I have a Proxy configured inside Docker, if it can be useful.
Thank you very much.
wordpress docker
add a comment |
My wordpress inside a container doesn’t connect to the Internet, so if I i.e. do an action like install a plugin, I receive an error like:
“Installation failed: An unexpected error occurred. Something may be
wrong with WordPress.org or this server’s configuration. If you
continue to have problems, please try the support forums.”.
Cam someone help me? I think it need some network options… I used docker instead of docker-compose, and run the instances with the following commands:
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7
docker run --name wordpress --link mysql -p 80:80 -d wordpress
It works, but wordpress don’t reach Internet.
I have a Proxy configured inside Docker, if it can be useful.
Thank you very much.
wordpress docker
add a comment |
My wordpress inside a container doesn’t connect to the Internet, so if I i.e. do an action like install a plugin, I receive an error like:
“Installation failed: An unexpected error occurred. Something may be
wrong with WordPress.org or this server’s configuration. If you
continue to have problems, please try the support forums.”.
Cam someone help me? I think it need some network options… I used docker instead of docker-compose, and run the instances with the following commands:
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7
docker run --name wordpress --link mysql -p 80:80 -d wordpress
It works, but wordpress don’t reach Internet.
I have a Proxy configured inside Docker, if it can be useful.
Thank you very much.
wordpress docker
My wordpress inside a container doesn’t connect to the Internet, so if I i.e. do an action like install a plugin, I receive an error like:
“Installation failed: An unexpected error occurred. Something may be
wrong with WordPress.org or this server’s configuration. If you
continue to have problems, please try the support forums.”.
Cam someone help me? I think it need some network options… I used docker instead of docker-compose, and run the instances with the following commands:
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7
docker run --name wordpress --link mysql -p 80:80 -d wordpress
It works, but wordpress don’t reach Internet.
I have a Proxy configured inside Docker, if it can be useful.
Thank you very much.
wordpress docker
wordpress docker
asked Nov 13 '18 at 10:41
F. BonannoF. Bonanno
83
83
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If the docker engine uses a proxy server, the following flag may solve the problem:
--network=host
It doesn't work, I see this error: Error response from daemon: conflicting options: host type networking can't be used with links. This would result in undefined behavior. So I think it isn't viable. Thank you anyway.
– F. Bonanno
Nov 13 '18 at 14:55
please remove this flag:--link mysql
– gopy
Nov 14 '18 at 6:56
No, I need that flag, I want to use that particular DB in another container. I need another solution, if it exists. Thank you anyway.
– F. Bonanno
Nov 14 '18 at 7:39
You are using port mapping on mysql machine, hence the wordpress machine can connect to mysql container. you don't need --link flag
– gopy
Nov 14 '18 at 8:08
But if I don't link the container, how can wordpress connect to the other container with mysql inside? Have I to run again the installation phase? Thank you very much.
– F. Bonanno
Nov 14 '18 at 11:25
|
show 2 more comments
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53279209%2fwordpress-in-docker-doesn-t-connect-to-the-internet%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If the docker engine uses a proxy server, the following flag may solve the problem:
--network=host
It doesn't work, I see this error: Error response from daemon: conflicting options: host type networking can't be used with links. This would result in undefined behavior. So I think it isn't viable. Thank you anyway.
– F. Bonanno
Nov 13 '18 at 14:55
please remove this flag:--link mysql
– gopy
Nov 14 '18 at 6:56
No, I need that flag, I want to use that particular DB in another container. I need another solution, if it exists. Thank you anyway.
– F. Bonanno
Nov 14 '18 at 7:39
You are using port mapping on mysql machine, hence the wordpress machine can connect to mysql container. you don't need --link flag
– gopy
Nov 14 '18 at 8:08
But if I don't link the container, how can wordpress connect to the other container with mysql inside? Have I to run again the installation phase? Thank you very much.
– F. Bonanno
Nov 14 '18 at 11:25
|
show 2 more comments
If the docker engine uses a proxy server, the following flag may solve the problem:
--network=host
It doesn't work, I see this error: Error response from daemon: conflicting options: host type networking can't be used with links. This would result in undefined behavior. So I think it isn't viable. Thank you anyway.
– F. Bonanno
Nov 13 '18 at 14:55
please remove this flag:--link mysql
– gopy
Nov 14 '18 at 6:56
No, I need that flag, I want to use that particular DB in another container. I need another solution, if it exists. Thank you anyway.
– F. Bonanno
Nov 14 '18 at 7:39
You are using port mapping on mysql machine, hence the wordpress machine can connect to mysql container. you don't need --link flag
– gopy
Nov 14 '18 at 8:08
But if I don't link the container, how can wordpress connect to the other container with mysql inside? Have I to run again the installation phase? Thank you very much.
– F. Bonanno
Nov 14 '18 at 11:25
|
show 2 more comments
If the docker engine uses a proxy server, the following flag may solve the problem:
--network=host
If the docker engine uses a proxy server, the following flag may solve the problem:
--network=host
answered Nov 13 '18 at 11:23
gopygopy
1637
1637
It doesn't work, I see this error: Error response from daemon: conflicting options: host type networking can't be used with links. This would result in undefined behavior. So I think it isn't viable. Thank you anyway.
– F. Bonanno
Nov 13 '18 at 14:55
please remove this flag:--link mysql
– gopy
Nov 14 '18 at 6:56
No, I need that flag, I want to use that particular DB in another container. I need another solution, if it exists. Thank you anyway.
– F. Bonanno
Nov 14 '18 at 7:39
You are using port mapping on mysql machine, hence the wordpress machine can connect to mysql container. you don't need --link flag
– gopy
Nov 14 '18 at 8:08
But if I don't link the container, how can wordpress connect to the other container with mysql inside? Have I to run again the installation phase? Thank you very much.
– F. Bonanno
Nov 14 '18 at 11:25
|
show 2 more comments
It doesn't work, I see this error: Error response from daemon: conflicting options: host type networking can't be used with links. This would result in undefined behavior. So I think it isn't viable. Thank you anyway.
– F. Bonanno
Nov 13 '18 at 14:55
please remove this flag:--link mysql
– gopy
Nov 14 '18 at 6:56
No, I need that flag, I want to use that particular DB in another container. I need another solution, if it exists. Thank you anyway.
– F. Bonanno
Nov 14 '18 at 7:39
You are using port mapping on mysql machine, hence the wordpress machine can connect to mysql container. you don't need --link flag
– gopy
Nov 14 '18 at 8:08
But if I don't link the container, how can wordpress connect to the other container with mysql inside? Have I to run again the installation phase? Thank you very much.
– F. Bonanno
Nov 14 '18 at 11:25
It doesn't work, I see this error: Error response from daemon: conflicting options: host type networking can't be used with links. This would result in undefined behavior. So I think it isn't viable. Thank you anyway.
– F. Bonanno
Nov 13 '18 at 14:55
It doesn't work, I see this error: Error response from daemon: conflicting options: host type networking can't be used with links. This would result in undefined behavior. So I think it isn't viable. Thank you anyway.
– F. Bonanno
Nov 13 '18 at 14:55
please remove this flag:
--link mysql
– gopy
Nov 14 '18 at 6:56
please remove this flag:
--link mysql
– gopy
Nov 14 '18 at 6:56
No, I need that flag, I want to use that particular DB in another container. I need another solution, if it exists. Thank you anyway.
– F. Bonanno
Nov 14 '18 at 7:39
No, I need that flag, I want to use that particular DB in another container. I need another solution, if it exists. Thank you anyway.
– F. Bonanno
Nov 14 '18 at 7:39
You are using port mapping on mysql machine, hence the wordpress machine can connect to mysql container. you don't need --link flag
– gopy
Nov 14 '18 at 8:08
You are using port mapping on mysql machine, hence the wordpress machine can connect to mysql container. you don't need --link flag
– gopy
Nov 14 '18 at 8:08
But if I don't link the container, how can wordpress connect to the other container with mysql inside? Have I to run again the installation phase? Thank you very much.
– F. Bonanno
Nov 14 '18 at 11:25
But if I don't link the container, how can wordpress connect to the other container with mysql inside? Have I to run again the installation phase? Thank you very much.
– F. Bonanno
Nov 14 '18 at 11:25
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53279209%2fwordpress-in-docker-doesn-t-connect-to-the-internet%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown