-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.genivi.rocko
64 lines (45 loc) · 1.69 KB
/
Dockerfile.genivi.rocko
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
FROM debian:9
MAINTAINER Mirza Krak "[email protected]"
ENV DEBIAN_FRONTEND noninteractive
ENV user mirza
ENV group mirza
ENV uid 1010
ENV gid 1010
USER root
# Make sure the package repository is up to date
RUN apt-get update && apt-get -y dist-upgrade
# Install some packages I cannot live without...
RUN apt-get -y install dos2unix git mc openssh-server screen tig tree vim strace
# Install the following utilities (required by poky)
RUN apt-get -y install curl make gcc g++ diffstat texinfo gawk chrpath wget libsdl1.2-dev
# Install extra packages (required for building GDP)
RUN apt-get -y install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python-git
# Make sure tool add-apt-repository is installed
RUN apt-get -y install software-properties-common
RUN apt-get -y install locales sudo iptables qemu-system-x86 \
uml-utilities bridge-utils dnsmasq net-tools \
netcat python-dev
# Make sure the directory exists, otherwise sshd will not start
RUN mkdir -p /var/run/sshd
ENV USER_HOME /home/${user}
RUN groupadd -g ${gid} ${group} \
&& useradd -d "$USER_HOME" -u ${uid} -g ${gid} -m -s /bin/bash ${user}
RUN usermod -a -G kvm mirza
RUN adduser mirza sudo
RUN echo "mirza ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
## Set LOCALE to UTF8
#
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
dpkg-reconfigure locales && \
/usr/sbin/update-locale LANG=en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# Expose sshd port
EXPOSE 22
RUN mkdir -p project
# Switch to user
USER ${user}
WORKDIR ${USER_HOME}
CMD ["/bin/bash"]