-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.template
36 lines (27 loc) · 1.07 KB
/
Dockerfile.template
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
FROM crops/yocto:@DISTRO@-base
USER root
ADD resources/shell-wrapper /usr/bin/shell-wrapper
ADD resources/install_clean /usr/bin/install_clean
ADD resources/yocto-env /opt/tools/yocto-env
RUN install_clean vim git wget curl sudo locales
# install vs-code
ENV CODE_VERSION "4.20.0"
RUN curl -fL https://github.com/coder/code-server/releases/download/v$CODE_VERSION/code-server-$CODE_VERSION-linux-amd64.tar.gz \
| tar -C /opt -xz && mv /opt/code-server-$CODE_VERSION-linux-amd64 /opt/code-server
ADD resources/code-server.yaml /opt/
# Set the locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Add tools to PATH
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/code-server:/opt/code-server/bin:/opt/tools
ADD @ENV_FOLDER@ /opt/tools
RUN install_clean jq @EXTRA_PKGS@
# Expose port 8080 (vs-code) and 8000 (free to play)
EXPOSE 8080
EXPOSE 8000
RUN grep -Fq sudo /etc/group && usermod -aG sudo yoctouser || usermod -aG wheel yoctouser
RUN echo "yoctouser:yoctouser" | chpasswd
USER yoctouser
CMD shell-wrapper
#:vim syntax=dockerfile