mirror of
https://github.com/soup-bowl/opensimulator-docker.git
synced 2026-07-28 14:59:14 +00:00
45 lines
1.3 KiB
Docker
45 lines
1.3 KiB
Docker
ARG DOTNET_VERSION=8.0
|
|
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build
|
|
|
|
ARG OPENSIM_VERSION=0.9.3.0
|
|
|
|
# Cache Bust to avoid caching skipping the latest commit
|
|
ADD https://api.github.com/repos/opensim/opensim/git/refs/heads/${OPENSIM_VERSION} version.json
|
|
RUN git clone --depth 1 --branch "${OPENSIM_VERSION}" https://github.com/opensim/opensim.git /app
|
|
WORKDIR /app
|
|
RUN rm -rf .git && \
|
|
./runprebuild.sh && \
|
|
./compile.sh && \
|
|
find . -name "*.pdb" -delete && \
|
|
rm -r -- *prebuild* compile.sh ThirdParty TESTING.txt Prebuild OpenSim* Makefile BUILDING.md && \
|
|
rm bin/config-include/storage/SQLiteStandalone.ini
|
|
COPY defaults bin/defaults
|
|
|
|
FROM alpine:3.21 AS prepare
|
|
|
|
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
|
|
|
ARG OPENSIM_VERSION=0.9.3.0
|
|
|
|
LABEL \
|
|
org.opencontainers.image.title="OpenSimulator (unofficial)" \
|
|
org.opencontainers.image.authors="code@soupbowl.io" \
|
|
org.opencontainers.image.source="https://github.com/soup-bowl/opensimulator-docker" \
|
|
org.opencontainers.image.licenses="MIT" \
|
|
org.opencontainers.image.version="${OPENSIM_VERSION}"
|
|
|
|
RUN apk add --no-cache dotnet8-runtime libgdiplus sqlite sqlite-libs uuidgen
|
|
|
|
COPY --from=build /app /opt/opensim
|
|
|
|
EXPOSE 9000
|
|
|
|
WORKDIR /opt/opensim/bin
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
|
|
FROM prepare AS final
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
CMD [ "dotnet", "OpenSim.dll", "-console=basic" ]
|