-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (56 loc) · 2.01 KB
/
Dockerfile
File metadata and controls
68 lines (56 loc) · 2.01 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
56
57
58
59
60
61
62
63
64
65
66
67
68
# kobragen docker
#
# Commands:
# docker build -t kobragen:latest .
# docker run --rm -it -v ${PWD}:/build kobragen:latest /bin/bash
# docker run --rm -v ${PWD}:/build kobragen:latest kobragen example output
FROM ubuntu:22.04@sha256:817cfe4672284dcbfee885b1a66094fd907630d610cab329114d036716be49ba
RUN apt-get update
# common
RUN apt-get install -y \
git \
curl
# kicad
RUN apt-get install -y \
kicad
# kicad automation scripts
RUN apt-get install -y \
python-pip \
xvfb \
recordmydesktop \
xdotool \
xclip \
&& \
git clone -b specctra_dsn_import_export --single-branch https://github.com/kbdmk/kicad-automation-scripts-fork.git /kas && \
sed -i 's/psutil==5.6.1/psutil==5.9.4/g' /kas/src/requirements.txt && \
pip2 install -r /kas/src/requirements.txt && \
mkdir -p /root/.config/kicad && \
cp /kas/config/* /root/.config/kicad && \
cp -r /kas/src /usr/lib/python2.7/dist-packages/kicad-automation && \
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 && \
apt-get -y remove python-pip
# patch kicad automation scripts and config
COPY copy-files/kicad/config/6.0 /root/.config/kicad/6.0
COPY copy-files/kicad/patch/export_dsn.py /usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/export_dsn.py
COPY copy-files/kicad/patch/import_ses.py /usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/import_ses.py
# ergogen
RUN apt-get install -y \
nodejs \
npm \
&& \
npm i -g ergogen@3.1.0
# freerouting
RUN apt-get install -y \
openjdk-17-jre && \
curl -o /opt/freerouting_cli.tar.gz http://repo.hu/projects/freerouting_cli/releases-jar/freerouting_cli-1.tar.gz && \
tar -xf /opt/freerouting_cli.tar.gz -C /opt && \
rm -rf /opt/freerouting_cli.tar.gz
ENV PATH="${PATH}:/opt/freerouting_cli/bin/"
# bundle kobragen script
COPY kobragen /opt/kobra/bin/kobragen
ENV PATH="${PATH}:/opt/kobra/bin"
# configure environment
ENV LANG C.UTF-8
# cleanup
RUN rm -rf /var/lib/apt/lists/*
WORKDIR /build