Skip to content

Commit

Permalink
Merge pull request #1036 from mumoshu/add-kanvas-to-containerimage
Browse files Browse the repository at this point in the history
Add kanvas to container image
  • Loading branch information
pirlodog1125 authored Dec 26, 2023
2 parents 76150fb + 10ce0a4 commit ca0e58a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,22 @@ COPY . .

RUN go build -o ./gocat

FROM debian:bullseye AS deps

RUN apt update && apt install -y curl

ENV KANVAS_VERSION=0.8.0

RUN curl -LO https://github.com/davinci-std/kanvas/releases/download/v${KANVAS_VERSION}/kanvas_${KANVAS_VERSION}_linux_amd64.tar.gz \
&& tar -xzf kanvas_${KANVAS_VERSION}_linux_amd64.tar.gz \
&& mv kanvas /usr/local/bin/kanvas \
&& rm kanvas_${KANVAS_VERSION}_linux_amd64.tar.gz

FROM debian:bullseye

WORKDIR /src
COPY --from=build /src/gocat /src/gocat
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=deps /usr/local/bin/kanvas /usr/local/bin/kanvas

CMD /src/gocat

8 changes: 8 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ RUN apt-get update && \
unzip awscliv2.zip && \
./aws/install

ENV KANVAS_VERSION=0.8.0

RUN apt install -y curl \
&& curl -LO https://github.com/davinci-std/kanvas/releases/download/v${KANVAS_VERSION}/kanvas_${KANVAS_VERSION}_linux_amd64.tar.gz \
&& tar -xzf kanvas_${KANVAS_VERSION}_linux_amd64.tar.gz \
&& mv kanvas /usr/local/bin/kanvas \
&& rm kanvas_${KANVAS_VERSION}_linux_amd64.tar.gz

RUN mkdir /bot
WORKDIR /bot

Expand Down

0 comments on commit ca0e58a

Please sign in to comment.