-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
97 lines (83 loc) · 2.42 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
FROM gitpod/openvscode-server:1.72.2
USER root
RUN apt update && apt install -y wget tar nano nginx tmux
RUN touch /home/workspace/.bashrc
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
-t agnoster \
-p colored-man-pages \
-p git \
-p man
# Get C++
RUN sudo apt-get update
RUN apt-get install -y gcc g++
RUN apt-get install -y --no-install-recommends cmake make
# Get Python
RUN sudo apt-get update
RUN sudo apt-get -y install python3.11 python3.11-dev
RUN sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2
RUN sudo update-alternatives --config python3
COPY get-pip.py /get-pip.py
RUN python3 /get-pip.py && rm /get-pip.py
# For pymavlink
RUN sudo apt-get -y install libxml2-dev libxslt-dev
# Get Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> /home/workspace/.bashrc
RUN echo 'export PATH="$PATH:/home/workspace/.local/bin"' >> /home/workspace/.bashrc
# This need to be the last step
RUN echo "zsh" >> /home/workspace/.bashrc
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN mkdir -p /service
COPY tmux.conf /etc/tmux.conf
COPY nginx.conf /etc/nginx/nginx.conf
COPY register_service /service/register_service
RUN mkdir -p /home/workspace/.local
COPY start.sh /start.sh
EXPOSE 100-65535/tcp
EXPOSE 100-65535/udp
LABEL version="1.1.2"
LABEL permissions='{\
"ExposedPorts": {\
"80/tcp": {}\
},\
"HostConfig": {\
"Privileged": true,\
"Binds": [\
"/usr/blueos/userdata/openvscode/.cache:/home/workspace/.cache:rw",\
"/usr/blueos/userdata/openvscode/.local:/home/workspace/.local:rw",\
"/usr/blueos/userdata:/userdata:rw",\
"/usr/blueos/openvscode:/openvscode:rw",\
"/var/run/docker.sock:/var/run/docker.sock:rw",\
"/usr/bin/docker:/usr/bin/docker:ro",\
"/etc/hostname:/etc/hostname:ro",\
"/dev:/dev:rw",\
"/:/home/workspace/host:rw"\
],\
"PortBindings": {\
"80/tcp": [\
{\
"HostPort": ""\
}\
]\
}\
}\
}'
LABEL authors='[\
{\
"name": "Patrick José Pereira",\
"email": "patrickelectric@gmail.com"\
}\
]'
LABEL readme="https://raw.githubusercontent.com/patrickelectric/blueos-code-server/master/README.md"
LABEL type="other"
LABEL tags='[\
"code",\
"development",\
"ide",\
"vscode",\
"python",\
"rust",\
"c++"\
]'
SHELL ["/bin/zsh", "-c"]
ENTRYPOINT ["/start.sh"]