-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
should it be dockerized? #7
Comments
I made one for testing https://hub.docker.com/r/julyighor/telegram-bot-api |
I also made one, It take 30 minutes to build FROM alpine:3.7 as builder
WORKDIR /server
RUN apk add --update alpine-sdk linux-headers git zlib-dev openssl-dev gperf cmake
RUN git clone --recursive https://github.com/tdlib/telegram-bot-api.git
RUN mkdir ./telegram-bot-api/build
RUN cd ./telegram-bot-api/build && \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. ..
RUN cd ./telegram-bot-api/build && \
cmake --build . --target install
RUN strip telegram-bot-api/bin/telegram-bot-api
FROM alpine:3.7
RUN apk add --update openssl libstdc++
COPY --from=builder /server/telegram-bot-api/bin/telegram-bot-api /bin/telegram-bot
ENTRYPOINT ["/bin/telegram-bot"] To build your own: docker build . --tag=telegram-bot-api
docker run -it telegram-bot-api |
Looks similar to mine. Are you sure that ca-certificates is not required? |
@cybervagabond If you want to build the Telegram Bot API server and run it using Docker, just do that. There can't be a Dockerfile that fits everyone needs. From the other side, writing a Dockerfile for the Telegram Bot API server is very simple and straightforward. So creation of the Dockerfile will be left for the server owner. |
@JulyIghor CA certificates will be needed for a TLS termination proxy like Nginx, which should be used to handle remote HTTPS requests. |
I think it is all about simplifying updates, if a build instructions changed, it will requires more time for update. |
Thats right, so requests to a telegram api servers isn't TLS encrypted? |
they use the MTProto Mobile Protocol I assume. https://core.telegram.org/mtproto |
If so, there could be much more possibilities of that bot than just using public bot API. |
You will get much less size if used |
@JulyIghor Build instructions are very unlikely to change and even they do, they can still be copypasted from the build instructions generator. Requests to Telegram Bot API server hosted on api.telegram.org must be TLS-encrypted. Requests from Telegram Bot API server to Telegram servers are MTProto-encrypted. |
no. checkout #1 for that discussion |
ya, I forgot to use strip. 😄 Also, we should use upx, too.
|
I don't think so, we will get both compressed and uncompressed binaries loaded in RAM |
Hello. While we are waiting for the official image, you can use ours: UPD1: add tagged builds |
To answer original question, yes, it should be dockerized. But given that there can't be a Dockerfile that fits everyone needs, it is better created by the server owner. At the worst, if the owner wants to use Docker, but can't write a very simple Dockerfile, then one of dozens Dockerfile created and mantained by others can be used. |
For now we wouldn't add an official Dockerfile, but such a file can be added in the future. |
Will you publish official docker image here https://hub.docker.com anytime soon? |
@JulyIghor There are no plans to do that in the near future. |
ok, so we have a big chance that some third party devs will make docker hub repo which will become very popular |
@JulyIghor Do you see any problem with that? If it is a good enough repo and its owner is trusted, why it shouldn't be popular? |
Less third parties involved in a project, more secure it is. |
Just added Github Actions on this project, then it will auto build an alpine docker for every update. |
where? |
Awesome!
If someone would be run bot-api on cloud native environment pull requests with Dockerfiles will be accepted or users must implement it on their side?
The text was updated successfully, but these errors were encountered: