A simple fileserver written in Go (1.12)
go build -o fileserver main.go
| Name | Default | Description |
|---|---|---|
| PORT | 8080 |
Port the fileserver is listening on |
| FILE_ROOT | ./ |
File root of the fileserver on the machine |
You can run the application as-is. No flags or parameters are required.
./fileserver
- Build the docker image:
docker build -t <tag> .
- Run the container. Use a
volumeto share data on your machine.
docker run --rm -p 8080:8080 -v ${PWD}:/root <tag>