tt icon indicating copy to clipboard operation
tt copied to clipboard

Functional: Docker install

Open joel72265 opened this issue 1 year ago • 5 comments

Thank you for the application.

Please can you try to make a docker install of the program, that would be very good

joel72265 avatar Jul 29 '23 08:07 joel72265

Here's a simple example for you:

Dockerfile

# This stage sets up tools to build the project, clones it, and creates an executable named `tt`.
FROM golang:alpine AS build

ENV CGO_ENABLED=0 

WORKDIR /app

RUN apk add --no-cache git \
    && git clone --depth=1 https://github.com/lemnos/tt . \
    && go build -o bin/tt src/*.go

# Copies the `tt` executable and sets it as the command to run.
FROM alpine

COPY --from=build  /app/bin/tt /bin/tt

ENTRYPOINT ["tt"]

How

# Build the Docker Image
docker build . -t dev:tt
# Run the Docker Container
docker run -it dev:tt
# To use `tt` with extra options
docker run -it dev:tt -h

nnzv avatar Aug 16 '23 02:08 nnzv

thank you for the steps :)

I will try to understand these step and follow

joel72265 avatar Aug 16 '23 06:08 joel72265

hi, I am able to to run the following commands

root@tt [ ~ ]# curl -L https://github.com/lemnos/tt/releases/download/v0.4.2/tt-osx -o /usr/local/bin/tt && sudo chmod +x /usr/local/bin/tt root@tt [ ~ ]# curl -o /usr/share/man/man1/tt.1.gz -L https://github.com/lemnos/tt/releases/download/v0.4.2/tt.1.gz root@tt [ ~ ]# tt -quotes en

I am able to use the application on the local system using SSH but I would like to run it as a container (and port) so that I can use it from a Web Browser. If you have any steps that would be very useful.

System: Photon OS

joel72265 avatar Aug 24 '23 12:08 joel72265

This Go project is a TUI app. It can't turn into a web app easily. Seeing a web version of 'tt' would be intriguing. However, I think it should be a fork, not altering the original functionality. This goes beyond the project's scope.

nnzv avatar Aug 24 '23 21:08 nnzv

yes, even a fork version. A web based application keeping the size minimal would be great :)

joel72265 avatar Aug 25 '23 10:08 joel72265