-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.auto
More file actions
32 lines (28 loc) · 1.12 KB
/
Copy pathDockerfile.auto
File metadata and controls
32 lines (28 loc) · 1.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
# Базовые настройки образа
ARG BASE_IMAGE=ubuntu:24.04
FROM ${BASE_IMAGE}
# Установка зависимостей
RUN apt-get update && \
apt-get install -y \
build-essential \
devscripts \
debhelper
# Настройка пользователя
ARG UID=1000
ARG GID=1000
ARG USERNAME=builder
RUN apt-get install -y sudo && \
if ! getent group ${GID} > /dev/null 2>&1; then \
groupadd -g ${GID} ${USERNAME}; \
fi && \
if ! getent passwd ${UID} > /dev/null 2>&1; then \
useradd -m -u ${UID} -g ${GID} -s /bin/bash ${USERNAME}; \
fi && \
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
USER ${UID}
# Подготовка окружения
COPY --chown=${UID}:${GID} . /build/open-vpn-toggler
WORKDIR /build/open-vpn-toggler
# Сборка пакета
VOLUME /build/open-vpn-toggler/output
CMD ["bash", "scripts/build-native", "1"]