Various lint and build optmisations.

This commit is contained in:
soup-bowl
2025-09-03 11:51:58 +01:00
parent 1537965027
commit c4d92a6bf4
7 changed files with 31 additions and 53 deletions
+15 -16
View File
@@ -1,29 +1,28 @@
FROM alpine:3.21
LABEL org.opencontainers.image.title="OpenSimulator (unofficial)"
LABEL org.opencontainers.image.authors="code@soupbowl.io"
LABEL org.opencontainers.image.source="https://github.com/soup-bowl/opensimulator-docker"
LABEL org.opencontainers.image.licenses="MIT"
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
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"
ENV OPENSIM_VERSION=0.9.3.0
RUN apk add --no-cache bash curl dotnet8-runtime screen uuidgen
RUN mkdir /opt/opensim-tmp \
&& curl "http://opensimulator.org/dist/opensim-${OPENSIM_VERSION}.tar.gz" | tar xzf - -C /opt/opensim-tmp \
&& rm /opt/opensim-tmp/opensim*/bin/OpenSim.ini \
&& rm /opt/opensim-tmp/opensim*/bin/config-include/StandaloneCommon.ini \
&& rm /opt/opensim-tmp/opensim*/bin/config-include/storage/SQLiteStandalone.ini \
&& mkdir /opt/opensim \
&& mv /opt/opensim-tmp/opensim*/* /opt/opensim
RUN apk add --no-cache curl dotnet8-runtime libgdiplus screen sqlite sqlite-libs uuidgen \
&& mkdir /opt/opensim-tmp \
&& curl "http://opensimulator.org/dist/opensim-${OPENSIM_VERSION}.tar.gz" | tar xzf - -C /opt/opensim-tmp \
&& rm /opt/opensim-tmp/opensim*/bin/OpenSim.ini \
&& rm /opt/opensim-tmp/opensim*/bin/config-include/StandaloneCommon.ini \
&& rm /opt/opensim-tmp/opensim*/bin/config-include/storage/SQLiteStandalone.ini \
&& mkdir /opt/opensim \
&& mv /opt/opensim-tmp/opensim*/* /opt/opensim
COPY defaults /opt/opensim/bin/defaults
EXPOSE 9000
# Down the bottom here while dependencies are an ongoing investigation.
RUN apk add --no-cache libgdiplus sqlite sqlite-libs
WORKDIR /opt/opensim/bin
COPY docker-entrypoint.sh /usr/local/bin/
-31
View File
@@ -1,31 +0,0 @@
version: '3.6'
services:
db:
image: docker.io/library/mariadb:10.5
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 5
volumes:
- "database_store:/var/lib/mysql"
environment:
MYSQL_DATABASE: metaverse
MYSQL_ROOT_PASSWORD: password
metaverse:
build:
context: .
depends_on:
db:
condition: service_healthy
ports:
- "9000:9000"
- "9000:9000/udp"
environment:
DATABASE_ENGINE: mysql
MYSQL_SERVER: db
MYSQL_DATABASE: metaverse
MYSQL_USER: root
MYSQL_PASSWORD: password
volumes:
database_store:
+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env ash
set -Eeo pipefail
chown -R $(id -u):$(id -g) defaults
+4 -1
View File
@@ -1,5 +1,7 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
LABEL \
org.opencontainers.image.title="OpenSimulator (unofficial)" \
org.opencontainers.image.authors="code@soupbowl.io" \
@@ -10,8 +12,9 @@ ARG OPENSIM_VERSION=0.9.3.0
ARG OPENSIM_SHA1="a4bcd861626195af80cc1f962d3a2f4528859ad2"
RUN apt-get update \
&& apt-get install -y apt-utils curl libc6-dev libgdiplus libsqlite3-dev screen uuid-runtime \
&& apt-get install --no-install-recommends -y apt-utils curl libc6-dev libgdiplus libsqlite3-dev screen uuid-runtime \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /opt/opensim-tmp \
&& curl -o /opt/opensim-tmp/opensim.tar.gz "http://opensimulator.org/dist/opensim-${OPENSIM_VERSION}.tar.gz" \
&& echo "${OPENSIM_SHA1} /opt/opensim-tmp/opensim.tar.gz" | sha1sum -c - \
+4 -1
View File
@@ -1,5 +1,7 @@
FROM docker.io/library/mono:6
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
LABEL \
org.opencontainers.image.title="OpenSimulator (unofficial)" \
org.opencontainers.image.authors="code@soupbowl.io" \
@@ -10,8 +12,9 @@ ARG OPENSIM_VERSION=0.9.2.2
ARG OPENSIM_SHA1="b280d109cf04755a02db1c729af5a5e4160d1ce6"
RUN apt-get update \
&& apt-get install -y curl screen uuid-runtime \
&& apt-get install --no-install-recommends -y curl screen uuid-runtime \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /opt/opensim-tmp \
&& curl -o /opt/opensim-tmp/opensim.tar.gz "http://opensimulator.org/dist/opensim-${OPENSIM_VERSION}.tar.gz" \
&& echo "${OPENSIM_SHA1} /opt/opensim-tmp/opensim.tar.gz" | sha1sum -c - \
+4 -1
View File
@@ -1,5 +1,7 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
LABEL \
org.opencontainers.image.title="OpenSimulator (unofficial)" \
org.opencontainers.image.authors="code@soupbowl.io" \
@@ -10,8 +12,9 @@ ARG OPENSIM_VERSION=0.9.3.0
ARG OPENSIM_SHA1="a4bcd861626195af80cc1f962d3a2f4528859ad2"
RUN apt-get update \
&& apt-get install -y apt-utils curl libc6-dev libgdiplus libsqlite3-dev screen uuid-runtime \
&& apt-get install --no-install-recommends -y apt-utils curl libc6-dev libgdiplus libsqlite3-dev screen uuid-runtime \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /opt/opensim-tmp \
&& curl -o /opt/opensim-tmp/opensim.tar.gz "http://opensimulator.org/dist/opensim-${OPENSIM_VERSION}.tar.gz" \
&& echo "${OPENSIM_SHA1} /opt/opensim-tmp/opensim.tar.gz" | sha1sum -c - \
+3 -2
View File
@@ -22,8 +22,9 @@ LABEL \
org.opencontainers.image.licenses="MIT"
RUN apt-get update && \
apt-get install -y apt-utils libc6-dev libgdiplus libsqlite3-dev screen uuid-runtime && \
apt-get clean
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