0
I am running the following docker image which runs an HTTP
server.
docker run --rm -ti -p 8080:8080 --name http-server -v DIRECTORY_TO_EXPOSE:/public redsadic/docker-http-server
From this command I understand that it exposes a directory /public
that allows us to POST a file.
When I try to POST
a file using curl
as below
curl -i -X POST --data-binary @test.txt http://127.0.0.1:8080/public
I get the following messaage on the client side.
HTTP/1.1 405 Method Not Allowed
server: ecstatic-1.4.0
Date: Fri, 13 Dec 2019 07:49:09 GMT
Connection: keep-alive
Content-Length: 0
On the server side, I get the following message.
[Fri Dec 13 2019 07:49:09 GMT+0000 (UTC)] "POST /public" "curl/7.47.0"
[Fri Dec 13 2019 07:49:09 GMT+0000 (UTC)] "POST /public" Error (404): "Not found"