Skip to content

Commit

Permalink
Add Dockerfile for Linux and Windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jclehner committed Sep 15, 2023
1 parent 03ef550 commit fe7a86d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ubuntu:focal

ENV TZ=Etc/UTC
ENV TERM=xterm
ENV APPIMAGE_EXTRACT_AND_RUN=1
ARG DEBIAN_FRONTEND=noninteractive
ARG NPCAP_VERSION=1.13

RUN apt-get update
RUN apt-get install -y build-essential pkg-config git zip wget file
RUN apt-get install -y g++-mingw-w64-i686
RUN apt-get install -y libpcap-dev libnl-3-dev libnl-route-3-dev

RUN mkdir -p /usr/src
WORKDIR /usr/src

ADD "https://api.github.com/repos/jclehner/nmrpflash/commits?per_page=1" latest_commit
RUN git clone https://github.com/jclehner/nmrpflash

WORKDIR /usr/src/nmrpflash
RUN wget -O npcap-sdk.zip https://npcap.com/dist/npcap-sdk-${NPCAP_VERSION}.zip
RUN unzip npcap-sdk.zip -d Npcap

RUN make release/linux-appimage
RUN make clean
RUN make MINGW=i686-w64-mingw32- release release/win32

7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,10 @@ release: clean nmrpflash$(SUFFIX)

nmrpflash.ico: nmrpflash.svg
convert -background transparent -define icon:auto-resize=256,64,48,32,16 $< $@

build-release-with-docker:
docker build -t nmrpflash .
docker create --name dummy nmrpflash
docker cp dummy:/usr/src/nmrpflash/nmrpflash-$(VERSION)-linux-$(ARCH).zip .
docker cp dummy:/usr/src/nmrpflash/nmrpflash-$(VERSION)-win32.zip .
docker rm -f dummy

0 comments on commit fe7a86d

Please sign in to comment.