-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
57 lines (44 loc) · 1.42 KB
/
Dockerfile
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
FROM ubuntu:22.04
# ---------------------------------------------------
# Basic system requirements
# ---------------------------------------------------
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python-is-python3 \
python3-pip \
golang-go \
go-bindata \
git \
tmux \
&& rm -rf /var/lib/apt/lists/*
# ---------------------------------------------------
# Install tty-share
# ---------------------------------------------------
WORKDIR /root
ENV GOPATH=/go
ENV GOBIN=/go/bin
RUN git clone /~https://github.com/elisescu/tty-share.git \
&& cd tty-share \
&& go-bindata --prefix server/frontend/static -o gobindata.go server/frontend/static/* \
&& go build \
&& cp tty-share /usr/bin/ \
&& rm -r $GOPATH
# ---------------------------------------------------
# Transition from root to a user matching a host UID,
# to avoid file ownership issues on the host
# ---------------------------------------------------
ARG HOST_UID=1000
RUN useradd -m -u ${HOST_UID} user
USER user
ENV USER=user
ENV HOME=/home/user
WORKDIR /home/user
# ---------------------------------------------------
# Install pip packages
# ---------------------------------------------------
ENV PATH="$PATH:/home/user/.local/bin"
RUN pip3 install revChatGPT colorama svglib --upgrade
# ---------------------------------------------------
# Default to a shell
# ---------------------------------------------------
ENTRYPOINT [ "bash", "-l" ]