macos: the Docker process opens the TCP port, but the connection is rejected

How can I run a simple server listening on a port, inside a Docker container?

(In case it matters, this is a MacOS X 10.13.6 host).

When I run a simple HTTP server:

python3 -m http.server 8001

the process starts correctly and listens correctly on that port (confirmed with telnet localhost 8001).

When I run a Docker container, it also executes the process correctly, but now the connection is rejected.

web-api / Dockerfile:

FROM python: 3.7
CMD python3 -m http.server 8001

docker-compose.yaml:

version: & # 39; 3 & # 39;
services:
web-api:
hostname: web-api
build:
context: ./web-api/
dockerfile: Dockerfile
expose:
- "8001"
ports:
- "8001: 8001"
networks:
- api_network
networks:
api network
driver: bridge

When I start the container (s), it is running the HTTP server:

$ docker-compose up --detach --build
Building web-api
[…]

$ docker ps
CONTAINER ID IMAGE COMMAND STATE CREATED NAMES OF THE PORTS
1db4cd1daaa4 ipsum_web-api "/ bin / sh -c & # 39; python3 ..." 8 minutes ago Up to 8 minutes 0.0.0.0:8001->8001/tcp ipsum_web-api_1

$ docker-machine ssh lorem

docker @ lorem: ~ $ ps -ef | grep http.server
Root 12883 12829 0 04:40? 00:00:00 python3 -m http.server 8001

docker @ lorem: ~ $ telnet localhost 8001
[connects successfully]
^ D

docker @ lorem: ~ $ exit

$ telnet localhost 8001
Trying: 1 ...
telnet: connect to address :: 1: connection rejected
Trying 127.0.0.1 ...
telnet: connect to address 127.0.0.1: connection rejected
telnet: can not connect to the remote host

What is configured incorrectly here, such that the server works inside the Docker container; but I have connection rejected on port 8001 when I connect outside The container in its port exposed?

BuyVIRT.com VPS OVZ / KVM | NL, HK, US | Raid 10 SSD | Port speed of 1 Gbps | From $ 2.80 / month

BuyVIRT was created by two of the most experienced people in the network in the area of ​​VPS, security and hosting.
We use the latest technologies and high-end hardware to provide the best possible hosting solution. We are ready to provide the highest level of services for our clients. Our equipment and servers are located in the Netherlands (Dronten), USA. UU (Ashburn) and Hong Kong, which is an additional guarantee of quality.

Because we?

Fast technical support 24/7
7 days of guaranteed money back
Easy to use, however, powefull control panel
Storage RAID 10 SSD protected
Port speed of 1Gbps
99.9% guaranteed uptime
Free off-site backup

______________________________________________________________________________________

Special WHT PROMO

✔ Use coupon M19-20 to get 20% ✔ The best in annual payments

✔ Use coupon M19-10 to get 10% ✔

______________________________________________________________________________________

Mirror
✔ CLICK HERE ✔

______________________________________________________________________________________

Self-managed OVZ NL

CPU: Up to 3 x 3.00 Ghz
RAM: Up to 4GB
SSD: Up to 60GB
Bandwidth: 2TB
Price from: $ 2.80 using coupon BV2019
== See all plans ==

______________________________________________________________________________________

Self-management OVZ US VA

CPU: Up to 3 x 3.00 Ghz
RAM: Up to 4GB
SSD: Up to 60GB
Bandwidth: 2TB
Price from: $ 2.80 using coupon BV2019
== See all plans ==

______________________________________________________________________________________

Self-managed OVZ HK

CPU: Up to 3 x 3.00 Ghz
RAM: Up to 4GB
SSD: Up to 60GB
Bandwidth: 2TB
Price from: $ 5.20 using the coupon BV2019
== See all plans ==

______________________________________________________________________________________

Fully managed OVZ NL / US VA / HK

CPU: Up to 3 x 3.00 Ghz
RAM: Up to 5GB
SSD: Up to 120GB
Bandwidth: 8TB
Price from: $ 33.20 using the coupon BV2019
== See all plans ==

______________________________________________________________________________________

KVM NL self-managed

CPU: Up to 3 x 3.00 Ghz
RAM: Up to 4GB
SSD: Up to 60GB
Bandwidth: 2TB
Price from: $ 5.20 using the coupon BV2019
== See all plans ==

______________________________________________________________________________________

Self-managed KVM US VA

CPU: Up to 3 x 3.00 Ghz
RAM: Up to 4GB
SSD: Up to 60GB
Bandwidth: 2TB
Price from: $ 5.20 using the coupon BV2019
== See all plans ==

______________________________________________________________________________________

KVM HK self-managed

CPU: Up to 3 x 3.00 Ghz
RAM: Up to 4GB
SSD: Up to 60GB
Bandwidth: 2TB
Price from: $ 6.00 using the coupon BV2019
== See all plans ==

______________________________________________________________________________________

Fully managed KVM NL / US VA / HK

CPU: Up to 3 x 3.00 Ghz
RAM: Up to 5GB
SSD: Up to 120GB
Bandwidth: 8TB
Price from: $ 38.80 using the coupon BV2019
== See all plans ==

______________________________________________________________________________________

Do you need a personalized plan?
Contact us at https://buyvirt.com Live chat and we will make a plan tailored to your needs.

Payment options:

At this moment we accept PayPal, PerfectMoney, Bitcoin, Litecoin and Ethereum.

Contact:

Live chat: https://buyvirt.com
E-mail: sales (at) buyvirt (dot) com
Customer Portal: https://portal.buyvirt.com

How to force AsRock BMC only using Mgn_Lan (IPMI port)?

The motherboard (EP2C602-2L + / D16) has Lan 1, Lan 2 and Mgn_Lan according to the manual. However, if I connect to the IP of Lan 2 and Mgn_Lan, it shows AsRock BMC. I have tried ipmitool, only Mgn_Lan is able to connect.

I have tried to disable Register BMC under DNS and disable the LAN interface in Network configuration If I simply disable BMC in Lan 2 but I still can not connect the normal server through IP. It seems that there are no options to force BMC to only use Mgn_Lan in BMC or BIOS.

How to force AsRock BMC only using Mgn_Lan?

apache 2.2 – How to redirect multiple domains to the same ip but different port for different services

In my VM, I'm running both apache2 Y nginx, but apache2 points to port 8080 and nginx is port 80. I have already pointed my domain to ip in nginx and it is running correctly. The same thing I need to do for apache2. But how am I going to give Port number While mapping the ip to the domain. In the cName registry, I can not specify the port. Is there an alternative way to solve these problems?

United Kingdom- E3-1220 v6 – 4GB RAM – 1TB HDD – 100 Mbps port – £ 35m / o

LayerVPS is a UK company that specializes in reliable hosting solutions.

Network test information

IP Test: 85.234.143.12

Server package

CPU: UK E3-1220 v6
Memory: 4GB DDR4 ECC
HDD: 1TB HDD SATAIII
Port Without Meter 100Mbps

Operating systems:

Centos / Debian / Ubuntu

Order now

Additional options

Extra IPv4 – £ 2 per month
Server management – £ 15 per month

Contact details

If you have any questions about sales, do not hesitate to send us an email to the following email.

sales@layervps.cc
Discordia: https://discord.gg/pmv3V4g

[Selling]HostBubble.net -cPanel, storage in SSD, 1GiB port, instant configuration, starting at $ 1 / m [US]

HostBubble cPanel Web hosting shared with Raid 10 Storage SSD protected with a dedicated uplink network of 1 Gbps.

Constant and fast website upload speed
Server location – Latham, New York

Check the speed of the network here- https://hostbubble.net/1000mb.bin

30-day money back guarantee on subscriptions of 6 months or more!

Instant activation of the cPanel account!

Payment…

[Selling]HostBubble.net -cPanel, storage in SSD, 1GiB port, instant configuration, starting at $ 1 / m [US]

[IPv4 IPv6] Taiwan dedicated, 4 cores 8G ram 10,000G BW 100mbps port = $ 149 / month!

characteristics:

1. 100% Hinet network
2. legally registered company (24823265) in Taiwan, NO SOHO or ONE MAN company
3. IPv4 IPv6 enabled
4. VPN allowed. The best VPN server option for the China market
5. DELL / HP / Supermicro Servers

Server options:

★ Intel® Xeon L5630 / 1x IPv4 tons of IPv6 / 500G SATA HDD / 8GB RAM / 10,000G BW in a port of 100MBPS = $ 149 / month
★ Intel® Xeon L5630x2 / 1x IPv4 tons of SATA HDD IPv6 / 500G / 16GB RAM / 15,000G W in port of 100MBPS = $ 189 / month

OS: Linux: free, Windows: $ 25 / month

To place an order or customize your order, send an email to sales@bigcloud.com.tw. We also make a customized compilation, please contact us for any need in Taiwan.

url of the company http://www.bigcloud.com.tw

R9Host >> Dedicated Servers from the USA UU With dedicated 1 Gbps port and 20 Gbps DDoS protection

R9HOST, 9x Reliability!

R9Host is in business since 2014 offering its clients innovative and high quality web hosting services. We now proudly offer cutting-edge performance and reliability from our locations in New York and Miami.

Characteristics of the dedicated server
—————————
✓ New York and Miami data centers
✓ Dedicated network connectivity of 1 Gbps
✓ 100% uptime of the network
✓ DDoS protection at 20Gbps
✓ Remote restart monitoring panel, RDNS and bandwidth

✓ Phone and ticket support
✓ Less than 12h Delivery

Fast deployment server plans

======================================================
Intel Core i5 4570

4 x 3.20GHz

16GB DDR4

128GB SSD

€ 73.00 / Month

Intel Core i7 4790

4 x 3.60GHz

16GB DDR4

SATA 2TB

€ 83.00 / Month

Intel Core i7 4790

4 x 3.60GHz

32GB DDR4

256 GB SSD

€ 94.00 / Month

Intel Core i7 6700K

4 x 4.00GHz

32GB DDR4

256 GB SSD + 2TB SATA

€ 105.00 / Month

Intel Core i7 6700K

4 x 4.00GHz

64GB DDR4

512 GB SSD + 2TB SATA

€ 131.00 / Month

Intel Core i7 7700K

4 x 4.20GHz

32GB DDR4

2x256GB SSD

€ 105.00 / Month

Intel Core i7 7700K

4 x 4.20GHz

64GB DDR4

2x512GB SSD

€ 147.00 / Month

Intel Xeon E3 1230 V3

4 x 3.30GHz

32GB DDR4

256 GB SSD

€ 90.00 / Month

Intel Xeon E3 1230

4 x 3.20GHz

32GB DDR4

64GB SSD + 2TB SATA

€ 78.00 / Month

Intel Xeon E3 1230 V3

4 x 3.30GHz

8GB DDR4

64GB SSD

€ 73.00 / Month

Intel Xeon E3 1240 V5

4 x 3.50GHz

16GB DDR4

256 GB SSD + 2TB SATA

€ 94.00 / Month

Intel Xeon E3 1240 V6

4 x 3.70GHz

16GB DDR4

256 GB SSD

€ 94.00 / Month

Intel Xeon E3 1240 V6

4 x 3.70GHz

16GB DDR4

SATA 2TB

€ 94.00 / Month

Intel Xeon E3 1240 V6

4 x 3.70GHz

64GB DDR4

SATA 2x2TB

€ 141.00 / Month

Intel Xeon E3 1245 V2

4 x 3.40GHz

32GB DDR4

256 GB SSD

€ 84.00 / Month

Intel Xeon E3 1245 V2

4 x 3.40GHz

32GB DDR4

SATA 2TB

€ 84.00 / Month

Intel Xeon E3 1270 V3

4 x 3.50GHz

16GB DDR4

64GB SSD + 1TB SATA

€ 85.00 / Month

Intel Xeon E3 1270 V3

4 x 3.50GHz

16GB DDR4

64GB SSD + 1TB SATA

€ 90.00 / Month

Intel Xeon E5 1650 V2

6 x 3.50GHz

64GB DDR4

2x256GB SSD + 2x2TB SATA

€ 192.00 / Month

Intel Xeon E5 1650 V3

6 x 3.50GHz

64GB DDR4

2x256GB SSD + 2x2TB SATA

€ 203.00 / Month

Intel Xeon E5 1650 V3

6 x 3.50GHz

128GB DDR4

2x1TB SSD + 2x2TB SATA

€ 254.00 / Month

Intel Xeon E5 1650 V4

6 x 3.60GHz

128GB DDR4

1TB SSD + 4TB SATA

€ 233.00 / Month

Dual Xeon E5 2620 V2

12 x 2.10GHz

128GB DDR4

SATA 2x2TB + SSD 2x256GB

€ 213.00 / Month

Dual Xeon E5 2620 V4

16 x 2.10GHz

64GB DDR4

SATA 4x2TB

€ 254.00 / Month

Storage server

4 x 3.20GHz

16GB DDR4

SATA 4x8TB

€ 203.00 / Month

We will make your business grow without problems!

Do you have questions?
Ask us for a ticket
or
Simply call us at +44 (20) 8089-3387

Redswitches.com: | 2 x Intel Xeon E5 | 8 Cores @ 2.2 GHz | 20TB BW | 1 port of GE | Start 10 euros | | Proxies123.com

[​IMG] Outdoor

VPS servers with 1 gbps instant activation with KVM virtualization and RAID 10 storage.

Redswitches.com: Happy to announce unmanaged VPS services Our 1 gbps VPS offers some of the fastest and most reliable server options, not to mention that compared to other VPS services, ours is a service based on the operating system Linux VPS surprisingly cheap, with KVM and RAID virtualization. 10 storage.

====================================================================================
Get in touch to deal with us:
E-mail: [email protected]
E-mail: [email protected]
Skype: sales switches
=====================================================================================

================================================================================
Pearl
================================================================================
2 x Intel Xeon E5 | 2 Cores @ 2.2 GHz
RAM:
4 GB DDR4
Storage: 35 GB SSD
Port: Port 1GE
Traffic: 5TB traffic
Location: Netherlands
Activation: Time: Instant activation
Price: € 10 / Month
Order now
================================================================================
Sapphire
================================================================================
2 x Intel Xeon E5 | 3 Cores @ 2.2 GHz
RAM:
6 GB DDR4
Storage: 50GB SSD
Port: Port 1GE
Traffic: 8TB traffic
Location: Netherlands
Activation: Time: Instant activation
Price: € 20 / Month
Order now
================================================================================
Gold
================================================================================
2 x Intel Xeon E5 | 5 Cores @ 2.2 GHz
RAM:
8GB of RAM
Storage: 65GB SSD
Port: Port 1GE
Traffic: 10TB traffic
Location: Netherlands
Activation time: Instant activation
Price: € 30 / Month
Order now
================================================================================
Jade
================================================================================
2 x Intel Xeon E5 | 6 Cores @ 2.2 GHz
RAM:
10GB Ram
Storage: 80 GB SSD
Port: Port 1GE
Traffic: 158TB traffic
Location: Netherlands
Activation time: Instant activation
Price: € 40 / Month
Order now
====================================================================================
Diamond
====================================================================================
2 x Intel Xeon E5 | 8 Cores @ 2.2 GHz
RAM:
12GB Ram
Storage: 100 GB SSD
Port: Port 1GE
Traffic: 20TB traffic
Location: Netherlands
Activation time: Instant activation
Price: € 50 / Month
Order now
====================================================================================

Get in touch to deal with us:
E-mail: [email protected]
E-mail: [email protected]
Skype: sales switches

=====================================================================================
FREQUENT QUESTIONS
=====================================================================================
1. What is VPS not administered?
Unmanaged VPS is like having your own dedicated server but with the benefits of shared hosting costs. Although technically it will share the same hardware server with others, that server will be divided into separate virtual servers that will be assigned to specific entities.

2. Is it possible to start with a monthly plan and then change to an annual plan?
Yes, this is absolutely possible.

3. Do you provide refunds after the server has been ordered?

No, we do not provide any refund on dedicated servers. Please, clean all your quarries in advance!
=====================================================================================
Do you have another question?
====================================================================================
Contact Us [email protected]
Website: Red Switches | Dedicated server, virtual private servers, web hosting
====================================================================================
Thank you
Calvin k
Sales team
Redswitches.com

Morocco – Do the trains arrive at the Beni Nsar port?

I am planning a trip to Morocco next year, and I am studying the possibility of getting from Melilla to Fes by train. There is not a station in Melilla, but the port of Beni Nsar seems to be about 20 minutes walking beyond the border. Unfortunately, although Beni Nsar Port is listed as a station on the ONCF website (Moroccan Railways), there are no services on the list, and this undated blog post suggests "the station that only exists on the Internet". However, Wikipedia suggests that it does exist, and it is displayed in Open Railway Map. Does anyone know the true situation? Is it just a temporary closure? Is it an error in the ONCF system? Or has the passenger service to Puerto Beni Nsar been suspended?

I am aware that Beni Nsar Ville and Nador Ville have trains.