diff --git a/Dockerfile b/Dockerfile index 1852ccc..b34208f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,7 @@ RUN cp -r /agent ./ #################################################################################### # This will collect dependent libraries so they're later copied to the final image. -RUN /agent/main version +RUN /dist/agent/main version ############################################### # Build Bento4 -> we want fragmented mp4 files @@ -66,7 +66,7 @@ RUN cd /tmp && git clone https://github.com/axiomatic-systems/Bento4 && cd Bento cd Build && \ cmake -DCMAKE_BUILD_TYPE=Release .. && \ make && \ - mv /tmp/Bento4/Build/mp4fragment /dist/ && \ + mv /tmp/Bento4/Build/mp4fragment /dist/agent/ && \ rm -rf /tmp/Bento4 FROM node:16.13.0-alpine3.11 AS build-ui @@ -83,7 +83,7 @@ RUN cd /go/src/github.com/kerberos-io/agent/ui && yarn && yarn build # Later, it will be copied as the / (root) of the output image. WORKDIR /dist -RUN cp -r /go/src/github.com/kerberos-io/agent/machinery/www ./ +RUN mkdir -p ./agent && cp -r /go/src/github.com/kerberos-io/agent/machinery/www ./agent/ ############################################ # Publish main binary to GitHub release diff --git a/machinery/src/utils/main.go b/machinery/src/utils/main.go index 092b585..33787d3 100644 --- a/machinery/src/utils/main.go +++ b/machinery/src/utils/main.go @@ -253,7 +253,7 @@ func CreateFragmentedMP4(fullName string, fragmentedDuration int64) { path, _ := os.Getwd() duration := fragmentedDuration * 1000 // This timescale is crucial, as it should be the same as the one defined in JOY4. - cmd := exec.Command("mp4fragment", "--timescale", "10000", "--fragment-duration", strconv.FormatInt(duration, 10), fullName, fullName+"f.mp4") + cmd := exec.Command("/agent/mp4fragment", "--timescale", "10000", "--fragment-duration", strconv.FormatInt(duration, 10), fullName, fullName+"f.mp4") cmd.Dir = path log.Log.Info(cmd.String()) var out bytes.Buffer