generated from gns3/vnc-template
build attempt 1
Some checks failed
Build Docker Image on Commit / build-and-publish (push) Failing after 8s
Some checks failed
Build Docker Image on Commit / build-and-publish (push) Failing after 8s
This commit is contained in:
parent
268d6b2798
commit
0b85953713
2 changed files with 34 additions and 8 deletions
38
Dockerfile
38
Dockerfile
|
@ -1,10 +1,36 @@
|
||||||
# use the base VNC image
|
# STAGE 1: Build CraftOS-PC
|
||||||
|
FROM alpine:latest as builder
|
||||||
|
|
||||||
|
RUN apk add --no-cache git cmake g++ make mono-msbuild mono-dev zlib-dev
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
# Clone the repository and get latest tag
|
||||||
|
RUN git clone https://github.com/MCJack123/craftos2.git . \
|
||||||
|
&& git fetch --tags \
|
||||||
|
&& LATEST_TAG=$(git tag | sort -V | tail -n 1) \
|
||||||
|
&& git checkout "$LATEST_TAG" \
|
||||||
|
&& git submodule update --init --recursive
|
||||||
|
|
||||||
|
# Attempt to build CraftOS-PC using MSBuild
|
||||||
|
# Note: This assumes CraftOS-PC is buildable on Linux using mono-msbuild
|
||||||
|
RUN msbuild "CraftOS-PC 2.sln" /p:Configuration=Release
|
||||||
|
|
||||||
|
# Assuming output binary ends up in a known location (adjust as needed)
|
||||||
|
# For example, `bin/Release/net462` or similar, and ROM is under `CraftOS-PC/ROM`
|
||||||
|
RUN mkdir /output && cp -r ROM /output/ROM \
|
||||||
|
&& find . -type f -name 'CraftOS-PC*' -executable -exec cp {} /output/ \;
|
||||||
|
|
||||||
|
# STAGE 2: Final image with CraftOS-PC
|
||||||
FROM git.merith.xyz/gns3/base-vnc:latest
|
FROM git.merith.xyz/gns3/base-vnc:latest
|
||||||
## START setting your image here
|
|
||||||
|
|
||||||
# RUN apk add --no-cache firefox-esr
|
# Copy entrypoint
|
||||||
|
|
||||||
## STOP setting up your image here
|
|
||||||
# DO NOT REMOVE AND DO NOT ADD AN "ENTRYPOINT" COMMAND
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
# Copy build output
|
||||||
|
COPY --from=builder /output /opt/craftos
|
||||||
|
|
||||||
|
# Optional: Add to PATH or set working directory
|
||||||
|
ENV PATH="/opt/craftos:$PATH"
|
||||||
|
WORKDIR /opt/craftos
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
xterm
|
/opt/craftos/craftos
|
Loading…
Reference in a new issue