forked from vitalets/docker-tizen-webos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
68 lines (58 loc) · 2.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM ubuntu:18.04
# Install prerequisites
RUN apt-get update && apt-get install -y \
ca-certificates \
wget \
zip \
unzip \
pciutils \
locales \
libssl1.0.0 \
# helper packages
curl \
net-tools \
nano \
&& rm -rf /var/lib/apt/lists/*
# Set the locale
# see: https://stackoverflow.com/questions/28405902/how-to-set-the-locale-inside-a-debian-ubuntu-docker-container
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Add a user
ARG USER=developer
RUN useradd --create-home ${USER}
ENV HOME /home/${USER}
USER ${USER}
WORKDIR ${HOME}
# Install tizen studio
# See: https://developer.tizen.org/development/tizen-studio/download/installing-tizen-studio#cli_installer
# Tizen Studio can't be installed under root, so we use developer.
# Tizen Studio must be installed in user home dir.
# See: https://stackoverflow.com/questions/47269478/error-installing-tizen-studio-on-windows-10
# See also: https://forum.developer.samsung.com/t/double-click-on-installer-tizen-studio-4-1-doesnt-launch-the-app-on-big-sure-11-3-1/13352/8
ARG TIZEN_STUDIO_VERSION=4.1.1
ARG TIZEN_STUDIO_FILE=web-cli_Tizen_Studio_${TIZEN_STUDIO_VERSION}_ubuntu-64.bin
ARG TIZEN_STUDIO_URL=http://download.tizen.org/sdk/Installer/tizen-studio_${TIZEN_STUDIO_VERSION}/${TIZEN_STUDIO_FILE}
RUN wget ${TIZEN_STUDIO_URL} \
&& chmod +x ${TIZEN_STUDIO_FILE} \
&& echo y | ./${TIZEN_STUDIO_FILE} --accept-license \
&& rm ${TIZEN_STUDIO_FILE}
# Copy sample author certificate and profiles.xml
COPY --chown=${USER} tizen-profile/author.p12 author.p12
COPY --chown=${USER} tizen-profile/profiles.xml ${HOME}/tizen-studio-data/profile/profiles.xml
# Container is intentionally started under the root user.
# Starting under non-root user will cause permissions issue when attaching volumes
# See: https://github.com/moby/moby/issues/2259
USER root
# Move Tizen studio from home because we mount home to host volume, and create symlink to keep everything working.
RUN mv ${HOME}/tizen-studio /tizen-studio \
&& ln -s /tizen-studio ${HOME}/tizen-studio
# Copy and extract webOS CLI
ARG WEBOS_SDK_PATH=/webOS_TV_SDK
COPY vendor/webos_cli_tv.zip .
RUN unzip -q webos_cli_tv.zip -d ${WEBOS_SDK_PATH} \
&& chmod -R +x ${WEBOS_SDK_PATH}/CLI/bin \
&& rm webos_cli_tv.zip
# Add tizen/webos cli to PATH
ENV PATH $PATH:/tizen-studio/tools/:/tizen-studio/tools/ide/bin/:/tizen-studio/package-manager/:${WEBOS_SDK_PATH}/CLI/bin