-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
50 lines (40 loc) · 1.18 KB
/
Dockerfile
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
46
47
48
49
50
# syntax=docker/dockerfile:1
# Build the final combined image
FROM clion007/alpine
LABEL mantainer="Clion Nihe Email: [email protected]"
ARG BRANCH="edge"
WORKDIR /tmp/xteve
ADD https://github.com/xteve-project/xTeVe-Downloads/raw/master/xteve_linux_amd64.zip ../xteve.zip
# add local files
COPY --chmod=755 root/ /
RUN set -ex; \
# unzip xteve to bin path
unzip ../xteve.zip -d /usr/bin/; \
chmod +x /usr/bin/xteve; \
\
# install pakeges needed
apk add --no-cache \
--repository=http://dl-cdn.alpinelinux.org/alpine/$BRANCH/main \
--repository=http://dl-cdn.alpinelinux.org/alpine/$BRANCH/community \
su-exec \
; \
\
# virtual install temporary pakges needed
apk add --no-cache --virtual .user-deps \
shadow \
; \
\
# set xteve process user and group
groupadd -g 101 xteve; \
useradd -u 100 -s /bin/nologin -M -g 101 xteve; \
chown xteve:xteve /usr/bin/xteve; \
\
apk del --no-network .user-deps; \
rm -rf \
/var/cache/apk/* \
/var/tmp/* \
/tmp/* \
;
# Expose 80 Port need set individual IP to container,34400 port is default
EXPOSE 80 34400
# entrypoint /init set in clion007/alpine base image