Coder Social home page Coder Social logo

kamildzi / tizen4docker Goto Github PK

View Code? Open in Web Editor NEW
49.0 1.0 6.0 1.32 MB

Docker based solution to run Tizen Studio IDE on ANY Linux distro.

License: GNU Lesser General Public License v3.0

Shell 68.01% Dockerfile 22.26% Perl 9.73%
tizen tizen-studio tizen-dev tizen-wearable tizen-ide docker-image

tizen4docker's Introduction

Tizen4Docker

This is a docker image allowing you to run Tizen-IDE on ANY Linux distribution.
The image is meant to provide fully featured environment for the IDE.

NOTE:

  • the image provides support for Tizen emulator (make sure check "Emulator Hardware Support")
  • the image has built-in java JDK
  • the image has built-in google-chrome browser (required by the IDE)

Requirements

Docker is the base requirement.
Make sure to have it installed on your system.

Detailed dependency check can be done with ./checkDeps.sh script.

# TEST THE REQUIREMENTS
./checkDeps.sh

Configuration

Base configuration (required)

  1. Please review the settings in .env.example file.
  2. Edit and save new settings as .env file.

Advanced configuration (optional, most users should be fine with defaults)

  1. You might want to change authentication method for the docker command. This can be done at runTizen.sh file (please check # Docker-Auth config header).
  2. Advanced configuration can be found at docker-compose.yml.
  3. Advanced users might be interested in debug mode ./runTizen.sh d (which allows easy access to docker container)

How to build?

Simply start a run script:

./runTizen.sh

This will automatically build docker-image if it is needed.

Alternatively you might start build command manually:

sudo docker compose build

How to run the IDE?

Just start the run script:

./runTizen.sh

(you might want to create a custom launcher to run this script)

NOTE: Tizen-Studio will be automatically fetched and installed on the first run

Emulator Hardware Support

Once the IDE is installed and started up, please be sure to enable Hardware Support for the emulator:

  1. open the Emulator Manager
  2. select desired emulator and click Edit
  3. go to the HW Support and enable settings:
    • CPU VT
    • GPU

IDE Upgrade / Reinstall process

This paragraph describes how to deal with upgrade and reinstall process.

Please note:

  • Refer to .env.example for details and detailed volume descriptions.
  • First step (data backup) is completely optional. You can skip this if you don't have any data to worry about.
  • Failed or incomplete installations can be fixed by following this procedure.

Please follow below steps:

  1. (Optional) Backup the data from docker volumes:
  • LOCAL_TIZEN_STUDIO_DIRECTORY
  • LOCAL_TIZEN_STUDIO_DATA_DIRECTORY
  • LOCAL_WORKSPACE

You might copy the data manually, or use a built-in backup script:

./runTizen.sh backup
  1. Delete the contents of the volumes (to force a clean install):
  • LOCAL_TIZEN_STUDIO_DIRECTORY
  • LOCAL_TIZEN_STUDIO_DATA_DIRECTORY
  • LOCAL_WORKSPACE (optional, don't wipe the workspace if you want your project data to stay intact)

You might wipe the directories manually or use built-in script. The script will ask you which volumes would you like to wipe out.

./runTizen.sh purge
  1. Edit .env file with your favourite editor (and change the TIZEN_VERSION)
nano .env
  1. Rebuild the docker image

First, please remove current Tizen4Docker image. Please note that image name (tizen4docker_tizen) might differ on your machine.

sudo docker image rm tizen4docker_tizen

After the image is deleted, please start the runner script. A new docker image will be built automatically and then the IDE will be installed.

./runTizen.sh

tizen4docker's People

Contributors

bonber avatar kamildzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tizen4docker's Issues

runTizenIDE.sh contains rm -rf ~/.local

Hi,

one of the scripts is hugely dangerous: runTizenIDE.sh contains the following lines:

rm -rf ~/.local
ln -s $VOLUME_DATA_DIR ~/.local

Had I not gotten an error before its execution (same as #12), my entire ~/.local folder would have been deleted! This is extremely dangerous as ~/.local contains almost all of my apps (in my case this is over 20 Gb of data).

Besides, commenting these lines and executing the script still resulted in a successful installation of the docker image. The IDE works as expected.

Samsung Cert Extension

If one has to use the Samsung Cert Extensions to deploy apps to Samsung Devices there has to be another directory mapped.
I added to .env:
LOCAL_SAMSUNGCERT_DIRECTORY=/home/someuser/Documents/Tizen/docker-volumes/SamsungCertificate
and to docker-compose.yml under volumes:
- "${LOCAL_SAMSUNGCERT_DIRECTORY}:/home/${TIZEN_USER}/SamsungCertificate"

Can not open Device Manager

When in tizen-studio I can not open Device Manager. All Other Menus I tried (eg. Certificate Manager) work.
I do not see any error message or such.

Tizen installation failed

While installing Tizen studio, I got this error:

image

And now restarting the script shows this error:

image

How can I restart the installation process?

Use Docker Compose v2 then fall back to `docker-compose`

Hello,
I'll probably make a PR about this, if I'm able to, I'd just like to make you aware that many people aren't using docker-compose anymore and are using docker compose instead.

I currently don't have docker-compose installed and checkdeps.sh is saying that it didn't find it.

I think that the script should be updated to use docker compose and fallback to docker-compose if the first isn't found.

Emulator; Cannot enable CPU VT

Good Evening once again. I have noticed that I cannot enable the CPU VT option in the emulator configuration. It responds;

"Your system cannot support HW Virtualization. Try installing KVM (ubuntu) or HAX (windows and mac)"

I've tried installing it but it didn't seem to work, and the debian image seems to reset every time it's open as it's never persistent (or at least when I tried it). I tried adding qemu-kvm libvirt-clients libvirt-daemon-system to the emulator dependencies in the Dockerfile but it didn't seem to work, as while the packages are installed, the option is still 'invalid'

PS: Running apt update also returned this;

E: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signed.

Arch - Install Error

Hi there,

first thanks for the work you've done. I'm on Arch and want to try out Tizen. However I'm not able to start it:
If I run ./runTizen.sh I get the following:

 [./runTizen.sh] Starting up ...
non-network local connections being added to access control list
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.9/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 950, in send
    self.connect()
  File "/usr/lib/python3.9/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 531, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.9/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 950, in send
    self.connect()
  File "/usr/lib/python3.9/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/usr/lib/python3.9/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/usr/lib/python3.9/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.28.4', 'console_scripts', 'docker-compose')())
  File "/usr/lib/python3.9/site-packages/compose/cli/main.py", line 80, in main
    command_func()
  File "/usr/lib/python3.9/site-packages/compose/cli/main.py", line 189, in perform_command
    project = project_from_options('.', options)
  File "/usr/lib/python3.9/site-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
  File "/usr/lib/python3.9/site-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
  File "/usr/lib/python3.9/site-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
  File "/usr/lib/python3.9/site-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
  File "/usr/lib/python3.9/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/usr/lib/python3.9/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
 [./runTizen.sh] Terminating ...
non-network local connections being removed from access control list

Appreciate any help!

'Failed to get Tizen' error during installation

Hi, I followed all the installation steps but in the end I got the error

--2020-12-15 15:39:14-- http://download.tizen.org/sdk/Installer/tizen-studio_5.5/web-cli_Tizen_Studio_5.5_ubuntu-64.bin Resolving download.tizen.org (download.tizen.org)... 52.79.222.238 Connecting to download.tizen.org (download.tizen.org)|52.79.222.238|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2020-12-15 15:39:15 ERROR 404: Not Found.

[/opt/scripts/installTizenIDE.sh;ERR] Failed to get Tizen from: http://download.tizen.org/sdk/Installer/tizen-studio_5.5/web-cli_Tizen_Studio_5.5_ubuntu-64.bin

[./runTizen.sh] Terminating ... non-network local connections being removed from access control list

I'm currently using Arch Linux

Emulator Manager + Device Manager not loading

Trying to launch either Emulator or Device Managers from Tizen Studio does nothing.

I then tried attaching a shell to the running container (docker exec -it <container id> bash) and running the emulator manager directly (~/tizen-studio/tools/emulator/bin/emulator-manager), which yielded the following output:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  37
  Current serial number in output stream:  38

I'm guessing maybe something is up with my host X11 config? I'm running stock Ubuntu 20.04 LTS with the Nvidia proprietary drivers on a RTX 2060.

[Error] mkdir: cannot create directory: Permission denied

Good Afternoon;I'm running into the issue state on the title. I'm running Manjaro KDE with docker 19.03. I'm almost certain I might've missed something, I'm honestly pretty new to docker; but as II have followed the Arch Wiki for Docker.
This occurs regardless of running with privileges or run as a normal user (albeit being part of the docker group).

Log

non-network local connections being added to access control list
mkdir: cannot create directory '~/tizen-studio-data/_EXT_TIZEN4DOCKER_': Permission denied
GNOME_KEYRING_CONTROL=~/.cache/keyring-JR0WK0
SSH_AUTH_SOCK=~/.cache/keyring-JR0WK0/ssh
bash: line 4: ~/tizen-studio/ide/TizenStudio.sh: No such file or directory
 [./runTizen.sh] Terminating ...
non-network local connections being removed from access control list

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.