Skip to content

Commit

Permalink
feat(images): bump to litd v0.13.99 and tapd v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaljsr committed Jul 23, 2024
1 parent 55255df commit b285729
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 33 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Supported Network Node Versions:
- [Core Lightning](https://github.com/ElementsProject/lightning) - v24.05, v24.02.2, v23.11.2
- [Eclair](https://github.com/ACINQ/eclair/) - v0.10.0, v0.9.0, v0.8.0, v0.7.0, v0.6.2, v0.5.0
- [Bitcoin Core](https://github.com/bitcoin/bitcoin) - v27.0, v26.0, v25.0, v24.0, v23.0, v22.0, v0.21.1
- [Taproot Assets](https://github.com/lightninglabs/taproot-assets) - v0.3.3, v0.3.2
- [Terminal](https://github.com/lightninglabs/lightning-terminal) - v0.13.0
- [Taproot Assets](https://github.com/lightninglabs/taproot-assets) - v0.4.0, v0.3.3, v0.3.2
- [Terminal](https://github.com/lightninglabs/lightning-terminal) - v0.13.99

## Dependencies

Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Replace `<version>` with the desired Eclair version (ex: `0.3.3`).

### Tags

- `0.4.0-alpha.rc4` ([tap/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/tapd/Dockerfile))
- `0.4.0-alpha` ([tap/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/tapd/Dockerfile))
- `0.3.3-alpha` ([tap/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/tapd/Dockerfile))
- `0.3.2-alpha` ([tap/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/tapd/Dockerfile))
- `0.3.1-alpha` ([tap/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/tapd/Dockerfile))
Expand All @@ -178,7 +178,7 @@ Replace `<version>` with the desired Tap version (ex: `0.2.0-alpha`).

### Tags

- `0.13.99-alpha.rc4` ([tap/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/tapd/Dockerfile))
- `0.13.99-alpha` ([tap/Dockerfile](https://github.com/jamaljsr/polar/blob/master/docker/tapd/Dockerfile))

**Building the image**

Expand Down
5 changes: 3 additions & 2 deletions docker/litd/src.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Start with a NodeJS base image that also contains yarn.
FROM node:16.14.2-buster-slim as nodejsbuilder

ARG LITD_VERSION

RUN apt-get update -y \
&& apt-get install -y git

# Copy in the local repository to build from.
RUN git clone --branch 0-19-staging https://github.com/lightninglabs/lightning-terminal.git /go/src/github.com/lightninglabs/lightning-terminal/
RUN git clone --branch ${LITD_VERSION} https://github.com/lightninglabs/lightning-terminal.git /go/src/github.com/lightninglabs/lightning-terminal/

RUN cd /go/src/github.com/lightninglabs/lightning-terminal/app \
&& yarn install \
Expand Down Expand Up @@ -41,7 +43,6 @@ RUN apt-get update -y \

FROM debian:stable-slim

ARG LITD_VERSION
ENV PATH=/opt/litd:$PATH

RUN apt-get update -y \
Expand Down
51 changes: 51 additions & 0 deletions docker/tapd/src.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM golang:1.22-bookworm as golangbuilder

# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
# queries required to connect to linked containers succeed.
ENV GODEBUG netdns=cgo

# Pass a tag, branch or a commit using build-arg. This allows a docker
# image to be built from a specified Git state. The default image
# will use the Git tip of master by default.
ARG checkout="main"
ARG git_url="https://github.com/lightninglabs/taproot-assets"

# Install dependencies and build the binaries.
RUN apt-get update -y \
&& apt-get install -y make \
&& git clone $git_url /go/src/github.com/lightninglabs/taproot-assets \
&& cd /go/src/github.com/lightninglabs/taproot-assets \
&& git checkout $checkout \
&& make release-install

FROM debian:stable-slim

ARG TAPD_VERSION
ENV PATH=/opt/taproot-assets:$PATH

RUN apt-get update -y \
&& apt-get install -y curl gosu wait-for-it \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# RUN SYS_ARCH="$(dpkg --print-architecture)" \
# && curl -SLO https://github.com/lightninglabs/taproot-assets/releases/download/v${TAPD_VERSION}/taproot-assets-linux-${SYS_ARCH}-v${TAPD_VERSION}.tar.gz \
# && tar -xzf *.tar.gz \
# && mkdir /opt/taproot-assets \
# && mv ./taproot-assets-linux-${SYS_ARCH}-v${TAPD_VERSION}/* /opt/taproot-assets \
# && rm *.tar.gz

COPY --from=golangbuilder /go/bin/tapd /bin/
COPY --from=golangbuilder /go/bin/tapcli /bin/

COPY docker-entrypoint.sh /entrypoint.sh

RUN chmod a+x /entrypoint.sh

VOLUME ["/home/tap/.tapd"]

EXPOSE 8089 10029

ENTRYPOINT ["/entrypoint.sh"]

CMD ["tapd"]
2 changes: 1 addition & 1 deletion src/store/models/designer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ describe('Designer model', () => {
expect.objectContaining({
message: 'Failed to add node',
error: new Error(
'This network does not contain a LND v0.16.0-beta (or higher) ' +
'This network does not contain a LND v0.18.0-beta (or higher) ' +
`node which is required for tapd v${tapdLatest}`,
),
}),
Expand Down
14 changes: 7 additions & 7 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export const REPO_STATE_URL =
* are pushed to Docker Hub, this list should be updated along with the /docker/nodes.json file.
*/
export const defaultRepoState: DockerRepoState = {
version: 61,
version: 62,
images: {
LND: {
latest: '0.18.2-beta',
Expand Down Expand Up @@ -371,21 +371,21 @@ export const defaultRepoState: DockerRepoState = {
versions: [],
},
tapd: {
latest: '0.3.3-alpha',
versions: ['0.4.0-alpha.rc4', '0.3.3-alpha', '0.3.2-alpha'],
latest: '0.4.0-alpha',
versions: ['0.4.0-alpha', '0.3.3-alpha', '0.3.2-alpha'],
// Not all tapd versions are compatible with all LND versions.
// This mapping specifies the minimum compatible LND for each tapd version
compatibility: {
'0.4.0-alpha.rc4': '0.18.0-beta',
'0.4.0-alpha': '0.18.0-beta',
'0.3.3-alpha': '0.16.0-beta',
'0.3.2-alpha': '0.16.0-beta',
},
},
litd: {
latest: '0.13.99-alpha.b801',
versions: ['0.13.99-alpha.b801'],
latest: '0.13.99-alpha',
versions: ['0.13.99-alpha'],
compatibility: {
'0.13.99-alpha.b801': '27.0',
'0.13.99-alpha': '27.0',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/utils/network.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ describe('Network Utils', () => {
it('should add a tap node linked to the exact minimum LND version', async () => {
const lnd = createLndNetworkNode(
network,
'0.16.0-beta',
'0.18.0-beta',
defaultRepoState.images.LND.compatibility,
{ image: '', command: '' },
Status.Stopped,
Expand Down
34 changes: 16 additions & 18 deletions src/utils/tests/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ export const testRepoState: DockerRepoState = {
version: 49,
images: {
LND: {
latest: '0.17.5-beta',
latest: '0.18.2-beta',
versions: [
'0.18.2-beta',
'0.18.1-beta',
'0.18.0-beta',
'0.17.5-beta',
'0.17.5-beta',
'0.17.4-beta',
'0.17.3-beta',
Expand Down Expand Up @@ -100,6 +104,9 @@ export const testRepoState: DockerRepoState = {
// not all LND versions are compatible with all bitcoind versions.
// this mapping specifies the highest compatible bitcoind for each LND version
compatibility: {
'0.18.2-beta': '27.0',
'0.18.1-beta': '27.0',
'0.18.0-beta': '27.0',
'0.17.5-beta': '27.0',
'0.17.4-beta': '27.0',
'0.17.3-beta': '27.0',
Expand Down Expand Up @@ -164,30 +171,21 @@ export const testRepoState: DockerRepoState = {
versions: [],
},
tapd: {
latest: '0.3.3-alpha',
versions: [
'0.3.3-alpha',
'0.3.2-alpha',
'0.3.1-alpha',
'0.2.3-alpha',
'0.2.2-alpha',
'0.2.0-alpha',
],
latest: '0.4.0-alpha',
versions: ['0.4.0-alpha', '0.3.3-alpha', '0.3.2-alpha'],
// Not all tapd versions are compatible with all LND versions.
// This mapping specifies the minimum compatible LND for each tapd version
compatibility: {
'0.4.0-alpha': '0.18.0-beta',
'0.3.3-alpha': '0.16.0-beta',
'0.3.2-alpha': '0.16.0-beta',
'0.3.1-alpha': '0.16.0-beta',
'0.3.0-alpha': '0.16.0-beta',
'0.2.3-alpha': '0.16.0-beta',
'0.2.2-alpha': '0.16.0-beta',
'0.2.0-alpha': '0.16.0-beta',
},
},
litd: {
latest: '0.12.5-alpha',
versions: ['0.12.5-alpha'],
latest: '0.13.99-alpha',
versions: ['0.13.99-alpha'],
compatibility: {
'0.12.5-alpha': '27.0',
'0.13.99-alpha': '27.0',
},
},
},
Expand Down

0 comments on commit b285729

Please sign in to comment.