-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathDockerfile
38 lines (32 loc) · 1.61 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
# All tools required for compilation belong in chip-build, forms "truth" for CHIP build tooling
FROM connectedhomeip/chip-build
# This Dockerfile contains things useful for an interactive development environment
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ENV LANG en_US.utf8
# these are installed for terminal/dev convenience. If more tooling for build is required, please
# add them to chip-build (in integrations/docker/images/chip-build)
RUN apt-get update
RUN apt-get install -y locales && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
RUN apt-get -fy install git vim emacs sudo \
apt-utils dialog zsh \
iproute2 procps lsb-release \
bash-completion \
build-essential cmake cppcheck valgrind \
wget curl telnet bsdtar \
docker.io
RUN groupadd --gid $USER_GID $USERNAME
RUN useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
RUN chmod 0440 /etc/sudoers.d/$USERNAME
RUN ln -s /usr/bin/clang-format-9 /usr/local/bin/clang-format
RUN mkdir -p /var/downloads
RUN cd /var/downloads
RUN curl -JL https://github.com/microsoft/vscode-cpptools/releases/download/0.27.0/cpptools-linux.vsix | bsdtar -xvf - extension
RUN mkdir -p /home/vscode/.vscode-server/extensions
RUN mv extension /home/vscode/.vscode-server/extensions/ms-vscode.cpptools-0.27.0
RUN mkdir -p /home/vscode/bin
RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/restyle-path -o /home/vscode/bin/restyle-path
RUN chmod +x /home/vscode/bin/restyle-path
RUN chown -R vscode:vscode /home/vscode