-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.manager
More file actions
55 lines (42 loc) · 1.61 KB
/
Dockerfile.manager
File metadata and controls
55 lines (42 loc) · 1.61 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
FROM ubuntu:22.04
ARG SELFHOSTYOURTECH_ROOT_ARG
ENV SELFHOSTYOURTECH_ROOT=${SELFHOSTYOURTECH_ROOT_ARG}
ENV VENV_NAME ".venv-docker"
# Install required packages and Docker
RUN apt-get update -y && apt-get install -y \
ca-certificates \
curl \
python3 \
python3-pip \
python3-venv \
inotify-tools \
sudo \
apt-transport-https \
gnupg \
lsb-release \
git \
apache2-utils
RUN curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && \
chmod +x /usr/bin/yq
RUN python3 -m pip install virtualenv && \
virtualenv "/opt/$VENV_NAME"
ENV PATH="/opt/$VENV_NAME/bin:${SELFHOSTYOURTECH_ROOT}/bin:${PATH}"
# Set up Docker's apt repository
RUN install -m 0755 -d /etc/apt/keyrings && \
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:-$VERSION_CODENAME}") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update package index with Docker repository and install Docker
RUN apt-get update -y && \
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Install Supervisor
RUN pip install supervisor pyyaml
# Create necessary directories
RUN mkdir -p /var/log/supervisor /etc/supervisor/conf.d
# Expose port for web interface
EXPOSE 9001
# Start script
CMD ["shtool", "run"]