-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (55 loc) · 2.06 KB
/
Dockerfile
File metadata and controls
63 lines (55 loc) · 2.06 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
# GOLANG BUILD CONTAINER for easy-novnc
# build easy-novnc server
FROM golang:1.14-buster AS easy-novnc-build
WORKDIR /src
RUN go mod init build && \
go get github.com/geek1011/easy-novnc@v1.1.0 && \
go build -o /bin/easy-novnc github.com/geek1011/easy-novnc
# APPLICATION RUNTIME container
FROM debian:buster-slim
ARG VERSION=NOT-SET
ARG BUILD_DATE=NOT-SET
ARG VCS_REF=NOT-SET
LABEL org.opencontainers.image.authors="dev@klib.io" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VERSION.$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/klibio/docker-osgi-starterkit" \
org.label-schema.vcs-ref=$VCS_REF
# Workaround https://unix.stackexchange.com/questions/2544/how-to-work-around-release-file-expired-problem-on-a-local-mirror
RUN echo "Acquire::Check-Valid-Until \"false\";\nAcquire::Check-Date \"false\";" | cat > /etc/apt/apt.conf.d/10no--check-valid-until
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
openbox \
tigervnc-standalone-server \
supervisor \
gosu \
\
libxext6 \
libxtst6 \
\
pcmanfm \
xarchiver \
nano \
geany \
procps \
\
lxterminal wget openssh-client rsync ca-certificates jq xdg-utils htop tar xzip gzip bzip2 zip unzip \
tzdata curl ca-certificates && \
rm -rf /var/lib/apt/lists && \
mkdir -p /usr/share/desktop-directories
COPY --from=easy-novnc-build /bin/easy-novnc /usr/local/bin/
COPY resources/etc /etc
EXPOSE 8080
#add unix user and group with specific home dir ~
RUN groupadd --gid 1000 app && \
useradd --home-dir /data --shell /bin/bash --uid 1000 --gid 1000 app && \
mkdir -p /data && \
echo $VERSION.$BUILD_DATE > /data/build_$VERSION.$BUILD_DATE.txt
ADD resources/data /data
RUN cd /data && \
./setup_01_java.sh && \
./setup_02_osgi-starterkit.sh && \
./setup_03_eclipse.sh
ENV JAVA_HOME=/data/jdk
ENV PATH=/data/jdk/bin:$PATH
CMD ["sh", "-c", "chown app:app /data /dev/stdout && exec gosu app supervisord"]