forked from tuna-f1sh/kicad-makefile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (38 loc) · 1.59 KB
/
Dockerfile
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
FROM ubuntu:latest
MAINTAINER John Whittington <[email protected]>
LABEL Description="KiCad 8.0 with KiCad Makefile and plugins used"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt upgrade -y && \
apt install -y wget make zip git python3 python3-pip poppler-utils && \
apt autoclean -y && \
apt autoremove -y && \
apt clean
RUN apt install software-properties-common -y
# Adding the repository for KiCad 8.0 stable release
RUN add-apt-repository --yes ppa:kicad/kicad-8.0-releases && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 245D5502FAD7A805
# Install KiCad 8.0
RUN apt update && apt install --install-recommends kicad -y
# Copy kicad-makefile and export environment location
COPY . kicad-makefile/
ENV KICADMK_DIR=/kicad-makefile
# Add KiCad plugins used
RUN git clone https://github.com/SchrodingersGat/kibom && \
cd kibom && \
pip install . && \
cp /kicad-makefile/bin/kibom /usr/bin
ENV BOM_CMD='python3 -m kibom'
# Add pcbnew module to PYTHONPATH
ENV PYTHONPATH=${PYTHONPATH}:/.kicad/scripting/plugins:/usr/share/kicad/scripting/plugins
# Copy default fp-lib-table to user home kicad config
RUN mkdir -p ~/.config/kicad/8.0 && \
cp /usr/share/kicad/template/fp-lib-table ~/.config/kicad/8.0/fp-lib-table && \
cp /usr/share/kicad/template/sym-lib-table ~/.config/kicad/8.0/sym-lib-table
# Set env to show running in container
ENV KICADMK_DOCKER=1
# Make the workdir mount
RUN mkdir project/
# Ensure git is happy running in mount
RUN git config --global --add safe.directory /project
WORKDIR project/