Files
DLE/webssh-agent/Dockerfile
2025-10-08 18:01:14 +03:00

42 lines
954 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM node:20-slim
# Устанавливаем необходимые пакеты
RUN apt-get update && apt-get install -y \
openssh-client \
sshpass \
curl \
wget \
docker.io \
ca-certificates \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Создаем рабочую директорию
WORKDIR /app
# Копируем package.json и package-lock.json
COPY package*.json ./
# Устанавливаем зависимости
RUN npm install
# Копируем исходный код
COPY . .
# Создаем SSH директорию для root с правильными правами
RUN mkdir -p /root/.ssh && \
chmod 700 /root/.ssh && \
touch /root/.ssh/config && \
chmod 600 /root/.ssh/config
# Оставляем root для доступа к Docker socket
# USER webssh
# Открываем порт
EXPOSE 3000
# Команда запуска
CMD ["npm", "start"]