56 lines
1.6 KiB
Docker
56 lines
1.6 KiB
Docker
FROM ubuntu:20.04 as builder
|
|
|
|
WORKDIR /root
|
|
|
|
# architecute amd64 armv7 arm64 s390x
|
|
ARG TARGETARCH=amd64
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
COPY ./ttyd-build-scripts .
|
|
|
|
RUN apt-get update && apt-get install -y autoconf automake build-essential cmake curl file libtool git && \
|
|
git clone https://github.com/tsl0922/ttyd.git && \
|
|
cd ttyd && \
|
|
bash ../make-dist.sh
|
|
|
|
# -------------------------------------------------------------------------------------------------------
|
|
|
|
FROM ubuntu:20.04 as final
|
|
|
|
ARG GITEA_REPO="standart"
|
|
ARG GITEA_USER="lorenzhohermuth"
|
|
|
|
ENV PATH="${PATH}:/opt/nvim-linux64/bin"
|
|
|
|
WORKDIR /root
|
|
|
|
# Dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends tini && rm -rf /var/lib/apt/lists/*
|
|
|
|
#neovim
|
|
RUN apt-get update && apt-get install -y curl tar git gcc && \
|
|
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz && \
|
|
tar -C /opt -xvf nvim-linux64.tar.gz
|
|
|
|
#oh my zsh
|
|
RUN apt-get update && apt-get install -y zsh && \
|
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
|
|
|
#nvim config
|
|
RUN mkdir .config && cd .config && \
|
|
git clone https://git.lorenzzz.dev/lorenzhohermuth/nvim.git && \
|
|
nvim --headless "+Lazy! sync" +qa && \
|
|
nvim --headless "+:SupermavenUseFree" +qa
|
|
|
|
#clone repo
|
|
#RUN git clone $REPO_URL && echo "cd ${$(basename "$_" .git)}" >> .zshrc
|
|
RUN git clone https://git.lorenzzz.dev/${GITEA_USER}/${GITEA_REPO}.git && echo "cd ${GITEA_REPO}" >> .zshrc
|
|
|
|
COPY --from=builder /root/ttyd/dist/ttyd /usr/bin/ttyd
|
|
|
|
EXPOSE 7681
|
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
|
CMD ["ttyd", "-W", "zsh"]
|