-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (45 loc) · 2.12 KB
/
Dockerfile
File metadata and controls
65 lines (45 loc) · 2.12 KB
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
# syntax=docker/dockerfile:1
###############################################################################
# Stage 1: Base image
###############################################################################
ARG PYTHON_VERSION=3.13.0
FROM python:${PYTHON_VERSION} as base
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
git \
zsh \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
###############################################################################
# Stage 2: Poetry Install
###############################################################################
FROM base as poetry-installer
ENV POETRY_VIRTUALENVS_IN_PROJECT=false \
POETRY_NO_INTERACTION=1
RUN curl -sSL https://install.python-poetry.org | python3 - \
&& ln -s /root/.local/bin/poetry /usr/local/bin/poetry
###############################################################################
# Stage 3: Zsh Configuration
###############################################################################
FROM poetry-installer as zsh-config
ENV ZSH_CUSTOM=/root/.oh-my-zsh/custom
# Install Oh My Zsh and clone plugins
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended \
&& git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM}/plugins/zsh-autosuggestions \
&& git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM}/plugins/fast-syntax-highlighting
# Clone asdf scripts
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf
# Install direnv
RUN curl -sfL https://direnv.net/install.sh | bash
COPY .devcontainer/override.zshrc /tmp/override.zshrc
RUN cat /tmp/override.zshrc >> ~/.zshrc \
&& chsh -s $(which zsh)
###############################################################################
# Stage 4: Development
###############################################################################
FROM zsh-config as development
WORKDIR /workspaces/jupyterhub
ENV SHELL=/bin/zsh
CMD ["zsh"]