-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.pterodactyl.alt
45 lines (33 loc) · 1.78 KB
/
Dockerfile.pterodactyl.alt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM golang:latest AS builder
RUN git clone https://github.com/senexcrenshaw/xTeVe.git /go/src/github.com/senexcrenshaw/xteve && \
cd /go/src/github.com/senexcrenshaw/xteve && \
go get github.com/avfs/avfs@latest && go get github.com/koron/go-ssdp && go get github.com/gorilla/websocket && go get github.com/kardianos/osext && go get github.com/samber/lo && go get github.com/stretchr/testify && \
go build xteve.go
# Actual container
FROM alpine:latest
# For entrypoint script
RUN apk add --no-cache bash
# Based on https://stackoverflow.com/a/49955098/2378368 and https://stackoverflow.com/a/63110882/2378368
RUN addgroup -g 2001 -S xteve && adduser -D -h /home/container -u 1001 -S container -G xteve
# Partially based on https://github.com/alturismo/xteve/blob/master/Dockerfile
VOLUME /home/container
COPY --from=builder /go/src/github.com/senexcrenshaw/xteve/xteve /usr/local/bin/xteve
RUN chmod +x /usr/local/bin/xteve
# Set timezone & install compatibility libraries according to https://stackoverflow.com/questions/51508150/standard-init-linux-go190-exec-user-process-caused-no-such-file-or-directory#comment117747592_62123648
RUN apk add --no-cache tzdata libc6-compat gcompat
ENV TZ=Europe/Amsterdam
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Instal ffmpeg
RUN apk add --no-cache ffmpeg
# Install VLC, but do not fail if the package does not exist
RUN apk add --no-cache vlc || true
# xTeVe runs on port 34400
EXPOSE 34400
# Set user, based on https://stackoverflow.com/a/49955098/2378368
USER container
ENV USER=container HOME=/home/container
# Define executable with parameters
# ENTRYPOINT [ "/usr/local/bin/xteve","-config=/home/container/.xteve/" ]
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]