ARG RELEASE |
ARG LAUNCHPAD_BUILD_ARCH |
LABEL org.opencontainers.image.ref.name=ubuntu |
LABEL org.opencontainers.image.version=22.04 |
ADD file:433cf0b8353e08be3a6582ad5947c57a66bdbb842ed3095246a1ff6876d157f1 in / |
CMD ["/bin/bash"] |
USER root |
LABEL maintainer=me@vaala.cat |
LABEL version=0.1 |
ENV CODESERVER_AUTH=none |
ENV CODESERVER_PORT=13337 |
RUN /bin/sh -c apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y apt-transport-https ca-certificates --no-install-recommends # buildkit |
RUN /bin/sh -c sed -i 's/http/https/g' /etc/apt/sources.list # buildkit |
RUN /bin/sh -c sed -i s@/archive.ubuntu.com/@/mirrors.cernet.edu.cn/@g /etc/apt/sources.list && sed -i s@/security.ubuntu.com/@/mirrors.cernet.edu.cn/@g /etc/apt/sources.list # buildkit |
RUN /bin/sh -c sed -i s@/ports.ubuntu.com/@/mirrors.cernet.edu.cn/@g /etc/apt/sources.list # buildkit |
RUN /bin/sh -c apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y curl gnupg zsh fish lsb-release wget tmux git build-essential sudo rsync ssh openssh-server supervisor vim unzip p7zip-full bash inetutils-ping net-tools pgcli htop locales man python3 python3-pip software-properties-common systemd sqlite3 netcat-openbsd systemd-sysv fuse3 dnsutils --no-install-recommends # buildkit |
RUN /bin/sh -c curl -sSL https://d.juicefs.com/install | sh - # buildkit |
ARG GO_VERSION=1.24.1 |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c if [ "$(uname -m)" = "x86_64" ]; then wget https://golang.google.cn/dl/go${GO_VERSION}.linux-amd64.tar.gz && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz; else wget https://golang.google.cn/dl/go${GO_VERSION}.linux-arm64.tar.gz && tar -C /usr/local -xzf go${GO_VERSION}.linux-arm64.tar.gz; fi && rm -rf go${GO_VERSION}.linux-*.tar.gz # buildkit |
ENV N_NODE_MIRROR=https://npmmirror.com/mirrors/node |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c apt install -y nodejs npm && npm install -g n --registry https://mirrors.huaweicloud.com/repository/npm/ && n lts # buildkit |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c npm install -g pnpm --registry https://mirrors.huaweicloud.com/repository/npm/ # buildkit |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c install -m 0755 -d /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && chmod a+r /etc/apt/keyrings/docker.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null # buildkit |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y docker-ce-cli # buildkit |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c curl -fsSL https://git.vaala.cloud/VaalaCat/configset/raw/branch/master/install-coder.sh | bash -s -- --method=standalone --prefix=/usr/local # buildkit |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c mkdir -p /etc/supervisor/conf.d && echo "[supervisord]\nlogdir=/home/coder/.config/supervisord/\nlogfile=/home/coder/.config/supervisord/supervisord.log\npidfile=/tmp/supervisord.pid\nnodaemon=true\nuser=root\n[program:sshd]\nuser=root\ncommand=/usr/sbin/sshd -D\n[program:child-process]\nuser=root\nstartsecs=0\nautorestart=false\nstartretries=1\ncommand=/home/coder/start.sh\n" > /etc/supervisor/conf.d/supervisord.conf && mkdir -p /run/sshd # buildkit |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c useradd coder --create-home --shell=/usr/bin/fish --uid=1000 --user-group && echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd && touch /home/coder/start.sh && chmod +x /home/coder/start.sh # buildkit |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c echo "ssh-keygen -A\nmkdir -p /home/coder/.config/supervisord/\nsudo -E /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf\n" > /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && chown -R coder:coder /home/coder # buildkit |
USER coder |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c pip config set global.index-url https://mirrors.cernet.edu.cn/pypi/web/simple && pip config set install.trusted-host mirrors.cernet.edu.cn && npm config set registry https://mirrors.huaweicloud.com/repository/npm/ && mkdir -p /home/coder/.bin # buildkit |
ENV GOPROXY=https://proxy.golang.com.cn,direct |
ENV GOPRIVATE=git.vaala.cloud |
ENV PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
ENV GOROOT=/usr/local/go |
ENV PATH=/home/coder/go/bin:/home/coder/.bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
RUN |1 GO_VERSION=1.24.1 /bin/sh -c git config --global url."ssh://git@git.vaala.cloud".insteadOf "https://git.vaala.cloud" # buildkit |
CMD ["sudo" "-E" "/docker-entrypoint.sh"] |