From 37c4b26bb1bea976802ef05ba912bfb3f3450da1 Mon Sep 17 00:00:00 2001 From: dgbrnd Date: Fri, 9 Aug 2024 16:10:22 +0900 Subject: [PATCH 1/2] Support Docker --- Dockerfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ab6e62e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM ubuntu:22.04 + +RUN apt-get update && apt-get install -y \ + git \ + build-essential \ + cmake \ + curl \ + && rm -rf /var/lib/apt/lists/* + +RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ + && apt-get install -y nodejs \ + && npm install -g npm@latest + +RUN curl -LO https://golang.org/dl/go1.20.6.linux-amd64.tar.gz \ + && tar -C /usr/local -xzf go1.20.6.linux-amd64.tar.gz \ + && rm go1.20.6.linux-amd64.tar.gz + +ENV PATH=$PATH:/usr/local/go/bin + +WORKDIR /app + +RUN git clone https://github.com/distantmagic/paddler.git . + +RUN make + +RUN mv ./paddler-bin-linux-x64 /usr/local/bin/paddler + +CMD ["paddler", "balancer"] From 01f8f231c9fd33f5b2bb769e7750ac6cbe703817 Mon Sep 17 00:00:00 2001 From: dgbrnd Date: Mon, 12 Aug 2024 08:40:23 +0900 Subject: [PATCH 2/2] modify Entrypoint --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ab6e62e..b3f9d2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,4 @@ RUN make RUN mv ./paddler-bin-linux-x64 /usr/local/bin/paddler -CMD ["paddler", "balancer"] +ENTRYPOINT ["paddler"]