Skip to content

Commit

Permalink
Add docker helper for bluetooth (evcc-io#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored May 16, 2020
1 parent 21c85ce commit 9bf987f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /build/evcc /usr/local/bin/evcc

COPY entrypoint.sh /evcc/
COPY bin/* /evcc/

EXPOSE 7070

Expand Down
Empty file added bin/docker-btmgmt
Empty file.
5 changes: 2 additions & 3 deletions charger/nrgble_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ func NewNRGKickBLE(device, macaddress string, pin int) *NRGKickBLE {
// set LE mode
btmgmt := hw.NewBtMgmt(device)

// don't add Docker binary on CI
if len(os.Getenv("DOCKER")) > 0 && os.Getenv("CI") == "" {
btmgmt.BinPath = "./bin/docker-btmgmt"
if len(os.Getenv("DOCKER")) > 0 {
btmgmt.BinPath = "./docker-btmgmt"
}

err := btmgmt.SetPowered(false)
Expand Down
1 change: 1 addition & 0 deletions tmpl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /build/evcc /usr/local/bin/evcc

COPY entrypoint.sh /evcc/
COPY bin/* /evcc/

EXPOSE 7070

Expand Down

0 comments on commit 9bf987f

Please sign in to comment.