-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker-Integration fuer lokale Entwicklung und Github Packages/Dockerhub #30
Open
janspeller
wants to merge
20
commits into
BOSWatch:develop
Choose a base branch
from
janspeller:feature/docker
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ea8fd94
add dockerfile for server, add docker-compose, change dockerfile for …
janspeller d8e8662
add newline in docker-compose.yaml
janspeller 6d3fe84
move Dockerfiles, change paths in docker-compose.yaml, change default…
janspeller 4864891
add build_image workflow
janspeller cf33db9
Add github package push
janspeller 93b84b4
add secrets
janspeller 1836223
rename repo to lowercase
janspeller 2862123
add push
janspeller 47c7577
change target repo
janspeller 20da06a
Update Dockerfile, add Build for Images, change docker-compose to use…
janspeller 7c728ce
Add Trigger
janspeller 2d2374d
typo
janspeller f3c2fbe
fix docker login
janspeller b574c86
fix docker repo path
janspeller 06f0e01
fix docker repo path
janspeller 74c8f40
Fix Multimon Path Variable, change rtlPath to Container Path, add con…
janspeller 17e761d
Remove old dockerfile
janspeller 3be1c11
Fix docker-compose image paths
janspeller 04d2a53
Label images to show them in repository
janspeller fe48da9
Change deprecated maintainer label to opencontainers spec and change …
janspeller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- feature/docker | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build the Docker image for the Client | ||
run: docker build . --file Dockerfile --target client --tag ghcr.io/janspeller/bw3-core/client:latest | ||
- name: Build the Docker image for the Server | ||
run: docker build . --file Dockerfile --target server --tag ghcr.io/janspeller/bw3-core/server:latest | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GH_PAT }} | ||
- name: Push the Client Docker image to Github package repository | ||
run: docker push ghcr.io/janspeller/bw3-core/client:latest | ||
- name: Push the Server Docker image to Github package repository | ||
run: docker push ghcr.io/janspeller/bw3-core/server:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,45 @@ | ||
FROM alpine:3.13 AS build-base | ||
RUN apk add git make cmake g++ libusb-dev libpulse | ||
FROM alpine:latest AS build-base | ||
RUN apk add --no-cache git make cmake g++ libusb-dev libpulse | ||
|
||
FROM build-base AS rtl_fm | ||
ARG RTL_SDR_VERSION=0.6.0 | ||
RUN git clone --depth 1 --branch ${RTL_SDR_VERSION} https://github.com/osmocom/rtl-sdr.git /opt/rtl_sdr | ||
RUN git clone --depth 1 https://gitea.osmocom.org/sdr/rtl-sdr.git /opt/rtl_sdr | ||
WORKDIR /opt/rtl_sdr/build | ||
RUN cmake .. && make | ||
RUN make install | ||
|
||
FROM build-base AS multimon | ||
ARG MULTIMON_VERSION=1.1.9 | ||
RUN git clone --depth 1 --branch ${MULTIMON_VERSION} https://github.com/EliasOenal/multimon-ng.git /opt/multimon | ||
RUN git clone --depth 1 https://github.com/EliasOenal/multimon-ng.git /opt/multimon | ||
WORKDIR /opt/multimon/build | ||
RUN cmake .. && make | ||
|
||
FROM alpine:3.13 AS boswatch | ||
FROM alpine:latest AS boswatch | ||
ARG BW_VERSION=develop | ||
RUN apk add git && \ | ||
git clone --depth 1 --branch ${BW_VERSION} https://github.com/BOSWatch/BW3-Core.git /opt/boswatch | ||
|
||
|
||
FROM python:3.9.1-alpine AS runner | ||
LABEL maintainer="bastian@schroll-software.de" | ||
FROM python:alpine AS client | ||
LABEL org.opencontainers.image.authors="info@schroll-it.de,jan@speller.biz" | ||
LABEL org.opencontainers.image.source=https://github.com/janspeller/BW3-Core | ||
|
||
# for RTL for MM | ||
RUN apk add libusb-dev libpulse && \ | ||
pip3 install pyyaml | ||
RUN apk add libusb-dev libpulse | ||
RUN pip3 install pyyaml | ||
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wieso zweimal RUN direkt nacheinander? |
||
|
||
COPY --from=boswatch /opt/boswatch/ /opt/boswatch/ | ||
COPY --from=multimon /opt/multimon/build/multimon-ng /opt/multimon-ng | ||
COPY --from=rtl_fm /opt/rtl_sdr/build/src/ /opt/rtl_sdr | ||
COPY --from=multimon /opt/multimon/build/multimon-ng /opt/multimon/multimon-ng | ||
COPY --from=rtl_fm /usr/local/bin/rtl_fm /opt/rtl_sdr/rtl_fm | ||
COPY --from=rtl_fm /usr/local/lib/librtlsdr.so.0 /usr/local/lib/librtlsdr.so.0 | ||
|
||
WORKDIR /opt/boswatch | ||
CMD python3 /opt/boswatch/bw_client.py -c client.yaml | ||
|
||
FROM python:alpine AS server | ||
LABEL org.opencontainers.image.authors="info@schroll-it.de,jan@speller.biz" | ||
LABEL org.opencontainers.image.source=https://github.com/janspeller/BW3-Core | ||
|
||
RUN pip3 install pyyaml | ||
COPY --from=boswatch /opt/boswatch/ /opt/boswatch/ | ||
WORKDIR /opt/boswatch | ||
CMD python3 /opt/boswatch/bw_server.py -c server.yaml | ||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3' | ||
services: | ||
client: | ||
image: ghcr.io/janspeller/bw3-core/client:latest | ||
volumes: | ||
- ./config:/opt/boswatch/config | ||
- ./log:/opt/boswatch/log | ||
devices: | ||
- "/dev/bus/usb" | ||
server: | ||
image: ghcr.io/janspeller/bw3-core/server:latest | ||
volumes: | ||
- ./config:/opt/boswatch/config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wieso sind die Versionsnummern weggefallen?
Das wurde damals ja extra so gemacht, weil es Probleme mit einer neueren Version gab.
So konnte man zum Build explizit vorgeben, was genutzt werden.
Same @ rtl_fm
Durch das ARG konnte man die Nummer dann nämlich auch zum Buildzeitpunkt übergeben.