cube-studio/images/code-server/Dockerfile-ubuntu-base
2022-06-08 16:47:57 +08:00

36 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# docker build -t ccr.ccs.tencentyun.com/cube-studio/notebook:code-server-ubuntu-base -f Dockerfile-ubuntu-base .
# docker run -it -p 127.0.0.1:8080:8080 -v "$PWD:/home/coder/project" --user root gashirar/code-server-on-k8s:latest
FROM gashirar/code-server-on-k8s
USER root
# 安装中文和基础的apt工具包
RUN apt update && apt install -y --force-yes --no-install-recommends vim apt-transport-https gnupg2 ca-certificates-java rsync jq wget git dnsutils iputils-ping net-tools curl mysql-client locales ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy && \
locale-gen zh_CN && locale-gen zh_CN.utf8
RUN curl -LO https://dl.k8s.io/release/v1.16.0/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl /usr/local/bin/
ENV LANG zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
ENV LANGUAGE zh_CN.UTF-8
RUN echo "alias ll='ls -alF'" >> /root/.bashrc && \
echo "alias la='ls -A'" >> /root/.bashrc && \
echo "alias vi='vim'" >> /root/.bashrc && \
/bin/bash -c "source /root/.bashrc"
# 安装python pip环境
RUN apt install -y python3 python3-pip python3-dev && ln -s /usr/bin/python3 /usr/bin/python && ln -s /usr/bin/pip3 /usr/bin/pip && pip3 install --upgrade pip
# 安装python包
RUN pip3 install gsutil pysnooper kubernetes simplejson sqlalchemy pandas numpy requests flask pymysql && \
rm -rf /tmp/* /var/tmp/* /root/.cache
# 安装最新版的nodejs
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash -
RUN apt-get install -y nodejs && npm config set unicode false
# 环境变量
ENV NODE_HOME /usr/local
ENV PATH $NODE_HOME/bin:$PATH
ENV NODE_PATH $NODE_HOME/lib/node_modules:$PATH
ENV SHELL /bin/bash