[HowTo] Compile applications with Docker instead of VirtualBox

asked 2018-08-17 10:39:04 +0200

coderus gravatar image

updated 2018-08-17 17:47:30 +0200

TLDR:

clone https://github.com/CODeRUS/docker-sailfishos-sdk-local.git

build and run container with provided scripts

for windows: compile helper-win

start qtcreator from helper- folder with qtcreator script

Information:

Docker container is based on https://github.com/SfietKonstantin/docker-sailfishos-sdk

Build script and Dockerfile contains instruction to create new container suitable for using with Sailfish OS SDK.

Technical details:

Container is based on latest sialfishos-buildengine-sdk container: https://hub.docker.com/r/coderus/sailfishos-platform-sdk

Dockerfile perform all magic operations including:

  • Add mersdk user to build engine
  • Transform Platform SDK to Application SDK
  • Install SSH server
  • Install SDK manage web interface

Additional helper scripts features:

  • run script expose 2222 and 8080 ports on windows, and using host network in linux systems.
  • helper-win contains c# console application for faking QtCreator virtualbox machine running status. start compile.bat to compile. For linux users no additional compilation is required.
  • install.sh for linux adds sdk-build-package command to your PATH, a handy mb2 wrapper.

Have fun and comment!

edit retag flag offensive close delete

Comments

good stuff -- haven't tried yet (did the sailfishos-platform-sdk image and now getting to know this stuff)

few notes (on potentially problematic issues):

  • you claim install.sh will put sdk-build-package into PATH -- well, $HOME/.local/bin is not in my PATH (perhaps I've screwed my environment by running some .zshrc content from mid 1990's ;) -- e.g. $HOME/bin exists and is in $PATH (fix the script to have "$HOME/.local/bin/" so that install.sh fails instead of creating $HOME/local/bin point to sdk-build-package)

  • sdk/start.sh starts with #!/bin/sh but has bashishm EXIT in trap. either change hashbang or s/EXIT/0/ in trap line

there is some minor things which i address on that github page...

too ( 2018-08-19 21:47:10 +0200 )edit

scripts/sdk-build-package references obs-sdk-local image...

too ( 2018-08-19 21:53:55 +0200 )edit

Excuse me, I'm a noob, could you add more instructions? After docker pull coderus/sailfishos-platform-sdk, what have i to do? How to run it in order to ssh in build engine? Thanks

paolomi ( 2019-01-04 10:41:41 +0200 )edit