-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (34 loc) · 1.23 KB
/
Dockerfile
File metadata and controls
42 lines (34 loc) · 1.23 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
FROM debian:bookworm-slim
LABEL org.opencontainers.image.source=https://github.com/ucsd-salad/docker-nicad
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y --no-install-recommends wget git build-essential ca-certificates
ARG TARGETARCH
ENV OPENTXL_URL=""
RUN if [ "$TARGETARCH" = "amd64" ]; then \
export BINARY_URL="https://github.com/CordyJ/OpenTxl/releases/download/v11.3.6/opentxl-11.3.6-linux-x64.tar.gz"; \
elif [ "$TARGETARCH" = "arm64" ]; then \
export BINARY_URL="https://github.com/CordyJ/OpenTxl/releases/download/v11.3.6/opentxl-11.3.6-linux-arm64.tar.gz"; \
else \
echo "Unsupported architecture"; exit 1; \
fi && \
wget $BINARY_URL -O opentxl.tar.gz && \
tar -xzf opentxl.tar.gz && \
rm opentxl.tar.gz
RUN cd /opentxl* && \
./InstallTxl.sh && \
cd .. && \
rm -rf /opentxl*
RUN git clone https://github.com/CordyJ/Open-NiCad.git && \
cd Open-NiCad && \
touch src/tools/*.c && \
make && \
./src/installer/InstallNicad.sh && \
cd .. && \
rm -rf Open-NiCad
RUN apt-get remove -y wget git build-essential && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir /nicad-data
WORKDIR /nicad-data
ENTRYPOINT ["nicad"]