Skip to content

Commit

Permalink
Move temporary content to /tmp.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Pazdziora committed Jun 10, 2018
1 parent 224a200 commit e0e47ed
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@ RUN 7za x sketchupmake-2017-2-2555-90782-en-x64.exe SketchUp2017-x64.msi && wine
RUN ls -la ".wine/drive_c/Program Files/SketchUp/SketchUp 2017/SketchUp.exe"
RUN sed -i 's/"LogPixels"=dword:.*/"LogPixels"=dword:00000080/' .wine/system.reg

ENTRYPOINT [ "wine64", ".wine/drive_c/Program Files/SketchUp/SketchUp 2017/SketchUp.exe" ]
COPY wine-tmp-list /
RUN mkdir .tmp-template
RUN while read i ; do mkdir -p "$( dirname .tmp-template/"$i" )" && ( test -e .wine/"$i" || mkdir -p .wine/"$i" ) && mv .wine/"$i" .tmp-template/"$i" && ln -sv /tmp/wine/"$i" .wine/"$i" ; done < /wine-tmp-list
ENV WINEPREFIX=/home/user/.wine
COPY run-sketchup /usr/local/bin/

ENTRYPOINT [ "/usr/local/bin/run-sketchup" ]
LABEL RUN 'docker run --tmpfs /tmp -e DISPLAY=$DISPLAY --security-opt=label:type:spc_t --user=$(id -u):$(id -g) -v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 --device=/dev/dri/card0:/dev/dri/card0 --rm sketchup'
14 changes: 14 additions & 0 deletions run-sketchup
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -e

mkdir /tmp/wine
( cd /home/user/.tmp-template && cp -rp . /tmp/wine )

echo [$WINEPREFIX]

if [ "$1" == 'winecfg' ] ; then
exec winecfg "$@"
else
exec wine64 $WINEPREFIX/"drive_c/Program Files/SketchUp/SketchUp 2017/SketchUp.exe" "$@"
fi
6 changes: 6 additions & 0 deletions wine-tmp-list
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.update-timestamp
system.reg
user.reg
drive_c/users/user/Temp
drive_c/users/user/Application Data/SketchUp/SketchUp 2017/WebCache
drive_c/users/user/Local Settings/Temporary Internet Files

0 comments on commit e0e47ed

Please sign in to comment.