Sign inSign up

evaladao/nchat

By evaladao

•Updated over 2 years ago

Dockerized nchat (a terminal-based chat client with support for Telegram and WhatsApp)

Image
Integration & delivery
1

1.5K

evaladao/nchat repository overview

⁠To use nchat, run the container as follows:

docker run -it --name nchat --rm -v nchat:/root/.nchat evaladao/nchat:latest-ubuntu

⁠OUTPUT

Protocols:

  1. Dummy
  2. Telegram
  3. WhatsAppMd
  4. Exit setup

Select protocol (3):

⁠ISSUE with WhatsApp (https://github.com/d99kris/nchat/issues/204⁠)

UNSUPPORTED PLATFORM: The WhatsApp protocol implementation officially only supports glibc on Linux. For details, refer to https://github.com/d99kris/nchat/issues/204⁠ Failed to load /usr/local/bin/../lib/libwmchat.so, skipping profile. Setup failed sh: tput: not found unexpected termination 11 callstack:

⁠Dockerfile contents:

FROM alpine:latest

MAINTAINER Kristofer Berggren https://d99kris.github.io/⁠

RUN apk update && apk add git

WORKDIR /app

⁠Download the latest nchat release and

RUN git clone https://github.com/d99kris/nchat⁠

WORKDIR /app/nchat

⁠FIX the "no sudo" issue

RUN sed -i 's/bash/sh/g ; s/sudo//g' make.sh

⁠Go version 1.18 is required to compile compatibility with WhatsApp. To fix this, we need the go version installed from apk to bootstrap the custom version built from source

RUN apk add go

ARG GOLANG_VERSION=1.18

RUN apk update && apk add go gcc bash musl-dev openssl-dev ca-certificates && update-ca-certificates

RUN cd /tmp/ && wget https://dl.google.com/go/go$GOLANG_VERSION.src.tar.gz⁠ && tar -C /usr/local -xzf go$GOLANG_VERSION.src.tar.gz

RUN cd /usr/local/go/src && ./make.bash

ENV PATH=$PATH:/usr/local/go/bin

RUN rm /tmp/go$GOLANG_VERSION.src.tar.gz

⁠Delete the apk installed version to avoid conflict

RUN apk del go

RUN go version

⁠Install nchat dependencies, compile and install nchat

RUN ./make.sh deps

RUN ./make.sh build && ./make.sh install

RUN rm -Rf /app/nchat

⁠Create a persistence volume to keep the setup profiles

VOLUME /root/.nchat

⁠Check if it is the first time the container is run and SETUP nchat or just RUN nchat

CMD if [[ $(ls -1 ~/.nchat/profiles/ | grep -v version | wc -l) -ge 1 ]] ; then nchat ; else nchat --setup ; fi

Tag summary

Content type

Image

Digest

sha256:c3d3706a4…

Size

546.4 MB

Last updated

over 2 years ago

docker pull evaladao/nchat