Add Dockerfile for containeraization
This commit is contained in:
parent
a9e1f1e82e
commit
bd145fddf0
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM golang:alpine
|
||||||
|
EXPOSE 8080 1935
|
||||||
|
RUN mkdir /app
|
||||||
|
ADD . /app
|
||||||
|
WORKDIR /app
|
||||||
|
RUN apk add --no-cache ffmpeg ffmpeg-libs
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o owncast .
|
||||||
|
RUN ls -al owncast
|
||||||
|
WORKDIR /app
|
||||||
|
CMD ["/app/owncast"]
|
@ -27,6 +27,7 @@
|
|||||||
* [Prerequisites](#prerequisites)
|
* [Prerequisites](#prerequisites)
|
||||||
* [Installation](#installation)
|
* [Installation](#installation)
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
|
* [Docker](#docker)
|
||||||
* [Usage with OBS](#usage-with-obs)
|
* [Usage with OBS](#usage-with-obs)
|
||||||
* [Video storage and distribution options](#video-storage-options)
|
* [Video storage and distribution options](#video-storage-options)
|
||||||
* [Advanced usage](#advanced-usage)
|
* [Advanced usage](#advanced-usage)
|
||||||
@ -84,6 +85,13 @@ The goal is to have a single service that you can run and it works out of the bo
|
|||||||
1. Open your web browser and visit http://yourserver:8080/. If you changed the port in the config file, then change the URL accordingly. If you are testing this on your own personal computer then you can visit http://localhost:8080.
|
1. Open your web browser and visit http://yourserver:8080/. If you changed the port in the config file, then change the URL accordingly. If you are testing this on your own personal computer then you can visit http://localhost:8080.
|
||||||
|
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
If you want a simpler way to run an instance of owncast you can run it in a container with the supplied Dockerfile.
|
||||||
|
|
||||||
|
1. Run `docker build -t owncast .`
|
||||||
|
1. Run `docker run -p 8080:8080 -p 1935:1935 -it owncast`
|
||||||
|
|
||||||
## Usage with OBS
|
## Usage with OBS
|
||||||
|
|
||||||
1. Install [OBS](https://obsproject.com/) and get it working with your local setup.
|
1. Install [OBS](https://obsproject.com/) and get it working with your local setup.
|
||||||
|
@ -73,7 +73,7 @@ func startFfmpeg(configuration Config) {
|
|||||||
|
|
||||||
// fmt.Println(ffmpegCmd)
|
// fmt.Println(ffmpegCmd)
|
||||||
|
|
||||||
_, err := exec.Command("bash", "-c", ffmpegCmd).Output()
|
_, err := exec.Command("sh", "-c", ffmpegCmd).Output()
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
verifyError(err)
|
verifyError(err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user