Skip to content

Commit 67e0c90

Browse files
author
Hoisko Sakari.M 10802213
committed
Added needed privialedges to run
1 parent 6c75380 commit 67e0c90

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Dockerfile_build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ RUN mvn package
1414
# ENTRYPOINT java -jar /code/target/javafxlibrary-*-SNAPSHOT-jar-with-dependencies.jar
1515

1616
FROM ubuntu:16.04
17+
COPY --from=builder /code/target/javafxlibrary-*-SNAPSHOT-jar-with-dependencies.jar /.
18+
COPY entrypoint_build.sh /.
1719
RUN apt-get -qq update && apt-get dist-upgrade -y && apt-get install -qq --no-install-recommends --allow-unauthenticated -y \
1820
openjdk-8-jre \
1921
openjfx \
20-
&& rm -rf /var/lib/apt/lists/*
21-
COPY --from=builder /code/target/javafxlibrary-*-jar-with-dependencies.jar /.
22+
&& rm -rf /var/lib/apt/lists/* && chmod 555 /javafxlibrary-*-jar-with-dependencies.jar /entrypoint_build.sh
2223
EXPOSE 8270
23-
COPY entrypoint_build.sh /.
2424
ENTRYPOINT /entrypoint_build.sh

docker/robot-javafx-demo/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ RUN apt-get -qq update && apt-get dist-upgrade -y && apt-get install -qq --no-i
2424
RUN pip install --no-cache-dir \
2525
robotframework
2626

27-
RUN mkdir ~/.vnc
28-
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
2927
COPY entrypoint.sh /entrypoint.sh
3028
COPY test.sh /bin/test.sh
29+
RUN mkdir ~/.vnc && x11vnc -storepasswd 1234 ~/.vnc/passwd && chmod 555 /entrypoint.sh /bin/test.sh
3130
EXPOSE 5900
3231

3332
ENTRYPOINT ["x11vnc", "-create", "-forever", "-env", "FD_PROG=/entrypoint.sh", "-env", "X11VNC_CREATE_GEOM=${1:-1024x768x16}", "-usepw"]

entrypoint_build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
22
rm -rvf /javafxbinary/*
33
cp -vf /javafxlibrary-*-jar-with-dependencies.jar /javafxbinary/.
4+
chmod 555 /javafxbinary/javafxlibrary-*-jar-with-dependencies.jar
45
java -jar /javafxlibrary-*-jar-with-dependencies.jar

0 commit comments

Comments
 (0)