-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile.host
60 lines (51 loc) · 1.97 KB
/
Dockerfile.host
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
# This Dockerfile allows running Darjeeling itself in a Docker
# container with a bind-mounted Docker socket.
# For example, to build a Dockerized Darjeeling and run it on the
# example/gcd project:
# docker build . -f Dockerfile.host -t darjeeling_host
# docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd)/example/gcd:/gcd darjeeling_host darjeeling repair /gcd/repair.yml
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update -eany \
&& apt install -y \
autoconf \
build-essential \
ca-certificates \
curl \
git \
libbz2-dev \
libffi-dev \
liblzma-dev \
libncurses-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
make \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Install Docker apt repository per official docs
# (https://docs.docker.com/engine/install/ubuntu/) so we can install
# just the client, not the full Docker engine.
RUN install -m 0755 -d /etc/apt/keyrings
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \
&& chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
RUN echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$UBUNTU_CODENAME") stable" \
> /etc/apt/sources.list.d/docker.list
RUN apt update && apt install -y docker-ce-cli && rm -rf /var/lib/apt/lists/*
WORKDIR /opt
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git pyenv
ENV PYENV_ROOT=/opt/pyenv
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"
RUN pyenv install 3.9 && pyenv global 3.9 && python3 --version
RUN python3 -m pip install --upgrade pip setuptools
RUN python3 -m pip install pipenv
COPY . /opt/darjeeling
WORKDIR /opt/darjeeling
RUN ls && env PIPENV_VENV_IN_PROJECT=1 python3 -m pipenv install --deploy
ENV PATH="/opt/darjeeling/.venv/bin:$PATH"
WORKDIR /