-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.cli
31 lines (26 loc) · 962 Bytes
/
Dockerfile.cli
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
FROM ubuntu:22.04
ARG USER_NAME=kicad
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN --mount=type=cache,target=/var/cache/apt \
DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
python3 \
python3-pip \
shared-mime-info \
software-properties-common \
sudo
RUN --mount=type=cache,target=/var/cache/apt \
DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:kicad/kicad-7.0-releases \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends kicad
RUN apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd --gid $USER_GID $USER_NAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USER_NAME \
&& usermod -aG sudo $USER_NAME \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER $USER_NAME
WORKDIR /home/$USER_NAME