Files
opensimulator-docker/build/latest/Dockerfile.source
T
2026-01-31 20:05:56 +00:00

40 lines
1.2 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 && \
rm bin/config-include/storage/SQLiteStandalone.ini
COPY defaults bin/defaults
FROM mcr.microsoft.com/dotnet/runtime:${DOTNET_VERSION}
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"
# hadolint ignore=DL3008
RUN apt-get update && \
apt-get install --no-install-recommends -y apt-utils libc6-dev libgdiplus libsqlite3-dev screen uuid-runtime && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /app /opt/opensim
EXPOSE 9000
WORKDIR /opt/opensim/bin
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD [ "screen", "-S", "OpenSim", "-D", "-m", "sh", "./opensim.sh" ]