Skip to content

Commit

Permalink
fix sbt issue on alpine.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Apr 10, 2023
1 parent 9dfc96d commit a94da96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
FROM alpine:3.16
RUN apk add bash git clang binutils-gold cmake make libgcc musl-dev gcc g++ libc6-compat libtool automake autoconf
RUN apk add sbt --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
RUN apk add bash git clang binutils-gold cmake make libgcc musl-dev gcc g++ libc6-compat libtool automake autoconf openjdk11
RUN git clone https://github.com/libuv/libuv && cd libuv && ./autogen.sh && ./configure && make && make install
RUN git clone https://github.com/bitcoin-core/secp256k1 && cd secp256k1 && ./autogen.sh && ./configure --enable-module-schnorrsig --enable-module-recovery && make && make install
COPY . /poncho
RUN cd /poncho && sbt clean compile

# sbt
RUN mkdir /sbt
RUN cd /sbt && wget https://github.com/sbt/sbt/releases/download/v1.8.2/sbt-1.8.2.zip
RUN cd /sbt && unzip sbt-1.8.2.zip

# build binary native static
RUN cd /poncho && /sbt/sbt/bin/sbt clean compile
ENV SN_LINK=static
CMD cd /poncho && sbt clean nativeLink
CMD cd /poncho && /sbt/sbt/bin/sbt clean nativeLink
4 changes: 2 additions & 2 deletions src/main/scala/Database.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ class Database(val path: Path = Paths.get("poncho").toAbsolutePath()) {
val newData = change(data)

newData.channels
.filter((key, chandata) =>
.filter { (key, chandata) =>
!data.channels.contains(key) || data.channels(key) != chandata
)
}
.foreach { (key, chandata) =>
val data = newData.channels(key)
val file = channelsDir.resolve(key.toHex ++ ".json")
Expand Down

0 comments on commit a94da96

Please sign in to comment.