From c7dc77ee660466121934a702bbc6c42a6c653389 Mon Sep 17 00:00:00 2001 From: Lordfox Date: Fri, 3 Oct 2025 23:12:44 +0200 Subject: [PATCH] =?UTF-8?q?ISSUE-17:=20fixes=20obsolete=20"version"=20attr?= =?UTF-8?q?ibute=20inside=20docker-compose.ym=E2=80=A6=20(#18)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ISSUE-17: fixes obsolete "version" attribute inside docker-compose.yml files * added .gitignore with some general basic settings * dockerfiles fixes - fixes missing permissions for .sh files inside the images - fixes COPY of multiple files (missing trailing slash '/' on target path - fixes use of hardcoded username:usergroup on COPY --chown * dockerfiles fixes - fixes COPY of multiple files (missing trailing slash '/' on target path * fixes missing OS_CONFIGKEY on setEnvironment.sh files --------- Co-authored-by: Lordfox --- .gitignore | 207 ++++++++++++++++++ image-ngc/Dockerfile-ngc | 11 +- image-ngc/docker-compose.yml | 3 - image-opensim-herbal3d/Dockerfile-herbal3d | 15 +- image-opensim-herbal3d/Dockerfile-opensim | 11 +- .../config-osgrid/scripts/setEnvironment.sh | 4 + .../scripts/setEnvironment.sh | 4 + image-opensim-herbal3d/docker-compose.yml | 3 - image-opensim-webrtc/Dockerfile-webrtc | 11 +- .../config-osgrid/scripts/setEnvironment.sh | 4 + .../scripts/setEnvironment.sh | 4 + image-opensim-webrtc/docker-compose.yml | 3 - image-opensim/Dockerfile-opensim | 11 +- .../config-osgrid/scripts/setEnvironment.sh | 4 + .../scripts/setEnvironment.sh | 4 + image-opensim/docker-compose.yml | 3 - 16 files changed, 263 insertions(+), 39 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2089f54 --- /dev/null +++ b/.gitignore @@ -0,0 +1,207 @@ +### MonoDevelop template +#User Specific +*.userprefs +*.usertasks + +#Mono Project Files +*.pidb +*.resources +test-results/ + +### TortoiseGit template +# Project-level settings +/.tgitconfig + +### VisualStudioCode template +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Xcode template +## User settings +xcuserdata/ + +### Linux template +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### PuTTY template +# Private key +*.ppk + +### Windows template +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### Vim template +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# +# Project related +# diff --git a/image-ngc/Dockerfile-ngc b/image-ngc/Dockerfile-ngc index 3b9ff2f..798f5a0 100644 --- a/image-ngc/Dockerfile-ngc +++ b/image-ngc/Dockerfile-ngc @@ -106,16 +106,17 @@ RUN adduser --disabled-password --gecos 'OpenSimulator user' $OS_ACCOUNT USER $OS_ACCOUNT:$OS_ACCOUNT # Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc -COPY --chown=opensim:opensim temp-run-scripts/*.sh $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/crontab $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/vimrc $OPENSIMHOME/.vimrc +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/*.sh $OPENSIMHOME/ +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/crontab $OPENSIMHOME +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/vimrc $OPENSIMHOME/.vimrc # Copy the binary files -COPY --from=build --chown=opensim:opensim $OPENSIMDIR/build/$OS_BUILDTARGET $OPENSIMDIR/bin -COPY --from=build --chown=opensim:opensim $VERSIONDIR $VERSIONDIR +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $OPENSIMDIR/build/$OS_BUILDTARGET $OPENSIMDIR/bin +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $VERSIONDIR $VERSIONDIR # The .ini files in config-include in the image are not used and are emptied here to eliminate any confusion RUN cd $OPENSIMDIR/bin/config-include \ + && chmod +x $OPENSIMHOME/*.sh \ && $OPENSIMHOME/nullOutConfigInclude.sh # Create the directory that is mounted that includes all the configuration diff --git a/image-ngc/docker-compose.yml b/image-ngc/docker-compose.yml index d3151fc..59975a6 100644 --- a/image-ngc/docker-compose.yml +++ b/image-ngc/docker-compose.yml @@ -1,6 +1,3 @@ - -version: '3' - networks: localnet: driver: bridge diff --git a/image-opensim-herbal3d/Dockerfile-herbal3d b/image-opensim-herbal3d/Dockerfile-herbal3d index 6fb8f0b..e2e8f17 100644 --- a/image-opensim-herbal3d/Dockerfile-herbal3d +++ b/image-opensim-herbal3d/Dockerfile-herbal3d @@ -159,21 +159,22 @@ RUN adduser --disabled-password --gecos 'OpenSimulator user' $OS_ACCOUNT USER $OS_ACCOUNT:$OS_ACCOUNT # Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc -COPY --chown=opensim:opensim temp-run-scripts/*.sh $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/crontab $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/vimrc $OPENSIMHOME/.vimrc +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/*.sh $OPENSIMHOME/ +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/crontab $OPENSIMHOME +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/vimrc $OPENSIMHOME/.vimrc # Copy the binary files -COPY --from=build --chown=opensim:opensim $OPENSIMDIR/bin $OPENSIMDIR/bin -COPY --from=build --chown=opensim:opensim $VERSIONDIR $VERSIONDIR +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $OPENSIMDIR/bin $OPENSIMDIR/bin +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $VERSIONDIR $VERSIONDIR # The NuGet DLLs are not copied into the bin directory. # TODO: Figure out why NuGet packages are not copied. -COPY --from=build --chown=opensim:opensim $OPENSIMDIR/.nuget/packages/fleck/1.2.0/lib/netstandard2.0/Fleck.dll $OPENSIMDIR/bin -COPY --from=build --chown=opensim:opensim $OPENSIMDIR/.nuget/packages/nlog/4.7.15/lib/netstandard2.0/NLog.dll $OPENSIMDIR/bin +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $OPENSIMDIR/.nuget/packages/fleck/1.2.0/lib/netstandard2.0/Fleck.dll $OPENSIMDIR/bin +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $OPENSIMDIR/.nuget/packages/nlog/4.7.15/lib/netstandard2.0/NLog.dll $OPENSIMDIR/bin # The .ini files in config-include in the image are not used and are emptied here to eliminate any confusion RUN cd $OPENSIMDIR/bin/config-include \ + && chmod +x $OPENSIMHOME/*.sh \ && $OPENSIMHOME/nullOutConfigInclude.sh # Create the directory that is mounted that includes all the configuration diff --git a/image-opensim-herbal3d/Dockerfile-opensim b/image-opensim-herbal3d/Dockerfile-opensim index 7881f28..772b3fa 100644 --- a/image-opensim-herbal3d/Dockerfile-opensim +++ b/image-opensim-herbal3d/Dockerfile-opensim @@ -109,16 +109,17 @@ RUN adduser --disabled-password --gecos 'OpenSimulator user' $OS_ACCOUNT USER $OS_ACCOUNT:$OS_ACCOUNT # Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc -COPY --chown=opensim:opensim temp-run-scripts/*.sh $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/crontab $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/vimrc $OPENSIMHOME/.vimrc +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/*.sh $OPENSIMHOME/ +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/crontab $OPENSIMHOME +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/vimrc $OPENSIMHOME/.vimrc # Copy the binary files -COPY --from=build --chown=opensim:opensim $OPENSIMDIR/bin $OPENSIMDIR/bin -COPY --from=build --chown=opensim:opensim $VERSIONDIR $VERSIONDIR +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $OPENSIMDIR/bin $OPENSIMDIR/bin +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $VERSIONDIR $VERSIONDIR # The .ini files in config-include in the image are not used and are emptied here to eliminate any confusion RUN cd $OPENSIMDIR/bin/config-include \ + && chmod +x $OPENSIMHOME/*.sh \ && $OPENSIMHOME/nullOutConfigInclude.sh # Create the directory that is mounted that includes all the configuration diff --git a/image-opensim-herbal3d/config-osgrid/scripts/setEnvironment.sh b/image-opensim-herbal3d/config-osgrid/scripts/setEnvironment.sh index 430254e..f19548d 100755 --- a/image-opensim-herbal3d/config-osgrid/scripts/setEnvironment.sh +++ b/image-opensim-herbal3d/config-osgrid/scripts/setEnvironment.sh @@ -15,7 +15,11 @@ if [[ ! -z "$OS_CONFIGKEY" ]] ; then for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do if [[ -e "$secretsFile" ]] ; then echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" + # export key for ccrypt - otherwise it fails + export OS_CONFIGKEY=$OS_CONFIGKEY; source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") + # unset the key again + unset OS_CONFIGKEY; HAVE_SECRETS=yes break; else diff --git a/image-opensim-herbal3d/config-standalone/scripts/setEnvironment.sh b/image-opensim-herbal3d/config-standalone/scripts/setEnvironment.sh index 430254e..f19548d 100755 --- a/image-opensim-herbal3d/config-standalone/scripts/setEnvironment.sh +++ b/image-opensim-herbal3d/config-standalone/scripts/setEnvironment.sh @@ -15,7 +15,11 @@ if [[ ! -z "$OS_CONFIGKEY" ]] ; then for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do if [[ -e "$secretsFile" ]] ; then echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" + # export key for ccrypt - otherwise it fails + export OS_CONFIGKEY=$OS_CONFIGKEY; source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") + # unset the key again + unset OS_CONFIGKEY; HAVE_SECRETS=yes break; else diff --git a/image-opensim-herbal3d/docker-compose.yml b/image-opensim-herbal3d/docker-compose.yml index 90b37bc..54fa26c 100644 --- a/image-opensim-herbal3d/docker-compose.yml +++ b/image-opensim-herbal3d/docker-compose.yml @@ -1,6 +1,3 @@ - -version: '3' - networks: localnet: driver: bridge diff --git a/image-opensim-webrtc/Dockerfile-webrtc b/image-opensim-webrtc/Dockerfile-webrtc index 5588adc..f3ef4e0 100644 --- a/image-opensim-webrtc/Dockerfile-webrtc +++ b/image-opensim-webrtc/Dockerfile-webrtc @@ -124,16 +124,17 @@ RUN adduser --disabled-password --gecos 'OpenSimulator user' $OS_ACCOUNT USER $OS_ACCOUNT:$OS_ACCOUNT # Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc -COPY --chown=opensim:opensim temp-run-scripts/*.sh $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/crontab $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/vimrc $OPENSIMHOME/.vimrc +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/*.sh $OPENSIMHOME/ +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/crontab $OPENSIMHOME +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/vimrc $OPENSIMHOME/.vimrc # Copy the binary files -COPY --from=build --chown=opensim:opensim $OPENSIMDIR/bin $OPENSIMDIR/bin -COPY --from=build --chown=opensim:opensim $VERSIONDIR $VERSIONDIR +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $OPENSIMDIR/bin $OPENSIMDIR/bin +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $VERSIONDIR $VERSIONDIR # The .ini files in config-include in the image are not used and are emptied here to eliminate any confusion RUN cd $OPENSIMDIR/bin/config-include \ + && chmod +x $OPENSIMHOME/*.sh \ && $OPENSIMHOME/nullOutConfigInclude.sh # Create the directory that is mounted that includes all the configuration diff --git a/image-opensim-webrtc/config-osgrid/scripts/setEnvironment.sh b/image-opensim-webrtc/config-osgrid/scripts/setEnvironment.sh index 430254e..f19548d 100755 --- a/image-opensim-webrtc/config-osgrid/scripts/setEnvironment.sh +++ b/image-opensim-webrtc/config-osgrid/scripts/setEnvironment.sh @@ -15,7 +15,11 @@ if [[ ! -z "$OS_CONFIGKEY" ]] ; then for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do if [[ -e "$secretsFile" ]] ; then echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" + # export key for ccrypt - otherwise it fails + export OS_CONFIGKEY=$OS_CONFIGKEY; source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") + # unset the key again + unset OS_CONFIGKEY; HAVE_SECRETS=yes break; else diff --git a/image-opensim-webrtc/config-standalone/scripts/setEnvironment.sh b/image-opensim-webrtc/config-standalone/scripts/setEnvironment.sh index 430254e..f19548d 100755 --- a/image-opensim-webrtc/config-standalone/scripts/setEnvironment.sh +++ b/image-opensim-webrtc/config-standalone/scripts/setEnvironment.sh @@ -15,7 +15,11 @@ if [[ ! -z "$OS_CONFIGKEY" ]] ; then for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do if [[ -e "$secretsFile" ]] ; then echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" + # export key for ccrypt - otherwise it fails + export OS_CONFIGKEY=$OS_CONFIGKEY; source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") + # unset the key again + unset OS_CONFIGKEY; HAVE_SECRETS=yes break; else diff --git a/image-opensim-webrtc/docker-compose.yml b/image-opensim-webrtc/docker-compose.yml index 91c396c..518557f 100644 --- a/image-opensim-webrtc/docker-compose.yml +++ b/image-opensim-webrtc/docker-compose.yml @@ -1,6 +1,3 @@ - -version: '3' - networks: localnet: driver: bridge diff --git a/image-opensim/Dockerfile-opensim b/image-opensim/Dockerfile-opensim index 7881f28..772b3fa 100644 --- a/image-opensim/Dockerfile-opensim +++ b/image-opensim/Dockerfile-opensim @@ -109,16 +109,17 @@ RUN adduser --disabled-password --gecos 'OpenSimulator user' $OS_ACCOUNT USER $OS_ACCOUNT:$OS_ACCOUNT # Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc -COPY --chown=opensim:opensim temp-run-scripts/*.sh $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/crontab $OPENSIMHOME -COPY --chown=opensim:opensim temp-run-scripts/vimrc $OPENSIMHOME/.vimrc +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/*.sh $OPENSIMHOME/ +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/crontab $OPENSIMHOME +COPY --chown=$OS_ACCOUNT:$OS_ACCOUNT temp-run-scripts/vimrc $OPENSIMHOME/.vimrc # Copy the binary files -COPY --from=build --chown=opensim:opensim $OPENSIMDIR/bin $OPENSIMDIR/bin -COPY --from=build --chown=opensim:opensim $VERSIONDIR $VERSIONDIR +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $OPENSIMDIR/bin $OPENSIMDIR/bin +COPY --from=build --chown=$OS_ACCOUNT:$OS_ACCOUNT $VERSIONDIR $VERSIONDIR # The .ini files in config-include in the image are not used and are emptied here to eliminate any confusion RUN cd $OPENSIMDIR/bin/config-include \ + && chmod +x $OPENSIMHOME/*.sh \ && $OPENSIMHOME/nullOutConfigInclude.sh # Create the directory that is mounted that includes all the configuration diff --git a/image-opensim/config-osgrid/scripts/setEnvironment.sh b/image-opensim/config-osgrid/scripts/setEnvironment.sh index 430254e..f19548d 100755 --- a/image-opensim/config-osgrid/scripts/setEnvironment.sh +++ b/image-opensim/config-osgrid/scripts/setEnvironment.sh @@ -15,7 +15,11 @@ if [[ ! -z "$OS_CONFIGKEY" ]] ; then for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do if [[ -e "$secretsFile" ]] ; then echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" + # export key for ccrypt - otherwise it fails + export OS_CONFIGKEY=$OS_CONFIGKEY; source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") + # unset the key again + unset OS_CONFIGKEY; HAVE_SECRETS=yes break; else diff --git a/image-opensim/config-standalone/scripts/setEnvironment.sh b/image-opensim/config-standalone/scripts/setEnvironment.sh index 430254e..f19548d 100755 --- a/image-opensim/config-standalone/scripts/setEnvironment.sh +++ b/image-opensim/config-standalone/scripts/setEnvironment.sh @@ -15,7 +15,11 @@ if [[ ! -z "$OS_CONFIGKEY" ]] ; then for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do if [[ -e "$secretsFile" ]] ; then echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" + # export key for ccrypt - otherwise it fails + export OS_CONFIGKEY=$OS_CONFIGKEY; source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") + # unset the key again + unset OS_CONFIGKEY; HAVE_SECRETS=yes break; else diff --git a/image-opensim/docker-compose.yml b/image-opensim/docker-compose.yml index 4b8d593..9821c94 100644 --- a/image-opensim/docker-compose.yml +++ b/image-opensim/docker-compose.yml @@ -1,6 +1,3 @@ - -version: '3' - networks: localnet: driver: bridge