-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The only change required to the core code was a modification to the root detection routine, to exempt Docker containers from the --asroot requirement. To build the container: $ docker build -t ckan . To use the container to update all mods: $ docker run --rm -v ${KSPDIR}:/kspdir ckan To use the container to install MechJeb: $ docker run --rm -v ${KSPDIR}:/kspdir ckan install MechJeb Both of the last two lines require that the ${KSPDIR} value be set. There is a docker-compose.yml supplied which will automatically do this for Linux users. To use the YAML file to build the container: $ docker-compose build ckan To use the YAML file to update all mods: $ docker-compose run --rm ckan To use the YAML file to install MechJeb $ docker-compose run --rm ckan install MechJeb
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM mono | ||
RUN echo '#!/bin/bash\n\ | ||
chown --reference=/kspdir/GameData -R /kspdir\n\ | ||
' >> /root/cleanup.sh | ||
RUN chmod +x /root/cleanup.sh | ||
RUN echo 'trap /root/cleanup.sh EXIT\n\ | ||
ckan()\n\ | ||
{\n\ | ||
mono /build/CmdLine.exe "$@" --kspdir /kspdir --headless\n\ | ||
}\n\ | ||
ckan update\n\ | ||
' >> /root/.bashrc | ||
RUN echo '#!/bin/bash\n\ | ||
source /root/.bashrc\n\ | ||
ckan scan\n\ | ||
if [ "$#" -ne 0 ]; then\n\ | ||
ckan $@\n\ | ||
else\n\ | ||
ckan upgrade --all\n\ | ||
fi\n\ | ||
' >> /root/entrypoint.sh | ||
RUN chmod +x /root/entrypoint.sh | ||
RUN apt-get -y update && apt-get -y install libcurl4-openssl-dev | ||
RUN mkdir /kspdir | ||
VOLUME ["/kspdir"] | ||
COPY . /source | ||
WORKDIR /source | ||
RUN nuget restore -NonInteractive | ||
RUN xbuild /property:Configuration=Release /property:OutDir=/build/ | ||
ENTRYPOINT ["/root/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: "2" | ||
services: | ||
ckan: | ||
build: . | ||
volumes: | ||
- ~/.steam/steam/steamapps/common/Kerbal Space Program/:/kspdir |