File tree 4 files changed +53
-0
lines changed
4 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ .git
2
+ Dockerfile
3
+ docker-compose.yml
Original file line number Diff line number Diff line change
1
+
2
+ ARG ARG_COMPILE_BASE_IMAGE=accetto/ubuntu-vnc-xfce-opengl-g3
3
+ FROM $ARG_COMPILE_BASE_IMAGE as build
4
+ USER root
5
+ RUN apt update && \
6
+ apt upgrade -y && \
7
+ apt install --fix-broken -y wget curl default-jre default-jdk
8
+ WORKDIR /src
9
+ # Get dependencies
10
+ RUN wget -q -O packr-all-4.0.0.jar https://github.com/libgdx/packr/releases/download/4.0.0/packr-all-4.0.0.jar && \
11
+ wget -q -O jre-linux-64.tar.gz https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jre_x64_linux_hotspot_11.0.11_9.tar.gz
12
+
13
+ # https://nieldw.medium.com/caching-gradle-binaries-in-a-docker-build-when-using-the-gradle-wrapper-277c17e7dd22
14
+ # Get gradle distribution
15
+ COPY *.gradle gradle.* gradlew /src/
16
+ COPY gradle /src/gradle
17
+ WORKDIR /src
18
+ RUN ./gradlew --version
19
+
20
+ # Build unciv
21
+ COPY . /src/
22
+ RUN ./gradlew classes
23
+ RUN ./gradlew desktop:packrLinux64 --stacktrace --info --daemon --scan
24
+ RUN ./gradlew desktop:zipLinuxFilesForJar
25
+
26
+ FROM accetto/ubuntu-vnc-xfce-opengl-g3 as run
27
+ WORKDIR /home/headless/Desktop/
28
+ COPY --chown=1001:1001 --from=build /src/desktop/packr/* /usr/
29
+ COPY --chown=1001:1001 --from=build /src/desktop/packr/Unciv.jar /usr/share/Unciv/Unciv.jar
30
+ COPY --chown=1001:1001 --from=build /src/desktop/linuxFilesForJar/* /home/headless/Desktop/
31
+ RUN chmod +x Unciv.sh
32
+ USER 1001
Original file line number Diff line number Diff line change @@ -125,5 +125,15 @@ Single player does not use this feature.
125
125
126
126
| [ ![ ] ( https://static.itch.io/images/badge.svg )] ( https://yairm210.itch.io/unciv ) | [ ![ ] ( https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png )] ( https://play.google.com/store/apps/details?id=com.unciv.app ) | [ ![ ] ( https://fdroid.gitlab.io/artwork/badge/get-it-on.png )] ( https://f-droid.org/en/packages/com.unciv.app/ ) | [ ![ ] ( https://flathub.org/assets/badges/flathub-badge-en.svg )] ( https://flathub.org/apps/details/io.github.yairm210.unciv )
127
127
| --- | --- | --- | --- |
128
+ ## Run with Docker
129
+
130
+ If you have docker and docker-compose installed, you can:
131
+
132
+ * Run ``` $ docker-compose build && docker-compose up ```
133
+ * Open http://localhost:6901/vnc.html?password=headless
134
+
135
+ And if you are using docker desktop:
136
+ * ``` $ docker compose build && docker compose up ```
137
+ * http://localhost:6901/vnc.html?password=headless
128
138
129
139
# [ Credits and 3rd parties] ( docs/Credits.md )
Original file line number Diff line number Diff line change
1
+ version : " 3.6"
2
+ services :
3
+ unciv :
4
+ build : .
5
+ ports :
6
+ - " 6901:6901"
7
+ - " 5901:5901"
8
+ command : /home/headless/Desktop/Unciv.sh
You can’t perform that action at this time.
0 commit comments