Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
/ nginx-old Public archive
forked from Andarius/nginx-upload

Nginx alpine docker with upload module

Notifications You must be signed in to change notification settings

PlayHideaway/nginx-old

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload File with Nginx upload module

  • ENV:
    • nginx-1.22.1-alpine
    • nginx-upload-module-2.3.0

Docker Image

Image available @https://hub.docker.com/repository/docker/andarius/nginx-upload

Run

  • Build the image:

    docker build -t nginx-upload:dev . -f Dockerfile
  • Start the nginx server:

    docker run --rm \
      -p 5050:5050 \
      -v "$(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro" \
      --name nginx-upload nginx-upload:dev

Test

  • To upload a file, run:
   curl 0.0.0.0:5050/upload -F "fileobj=@$(pwd)/README.md" -F "name=readme.md"

You can then see the uploaded file with:

docker exec nginx-upload ls -alh /tmp/nginx_upload

or with curl:

curl 0.0.0.0:5050/0000000001

About

Nginx alpine docker with upload module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 84.4%
  • Shell 15.6%