diff --git a/Dockerfile b/Dockerfile index c046463..c276a35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,39 +1,24 @@ FROM golang:alpine -RUN apk update && apk upgrade && \ - apk add --no-cache \ +RUN apk update && \ + apk upgrade && \ + apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \ + ffmpeg \ + libheif \ + libheif-dev \ bash \ git \ - curl \ - tar \ - xz \ pkgconfig \ - build-base \ - libheif \ - libheif-dev + build-base WORKDIR /bot -# download and extract FFmpeg 7.1 (GPL shared build) -RUN curl -L -o ffmpeg.tar.xz https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl-shared.tar.xz && \ - tar -xf ffmpeg.tar.xz && \ - rm ffmpeg.tar.xz && \ - cp -r ffmpeg-master-latest-linux64-gpl-shared/bin/* /usr/local/bin/ && \ - cp -r ffmpeg-master-latest-linux64-gpl-shared/lib/* /usr/local/lib/ && \ - cp -r ffmpeg-master-latest-linux64-gpl-shared/include/* /usr/local/include/ && \ - cp -r ffmpeg-master-latest-linux64-gpl-shared/lib/pkgconfig/* /usr/local/lib/pkgconfig/ && \ - ldconfig - -ENV CGO_CFLAGS="-I/usr/local/include" -ENV CGO_LDFLAGS="-L/usr/local/lib" -ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" - -RUN pkg-config --libs libavcodec +RUN mkdir downloads COPY . . -RUN mkdir -p downloads RUN chmod +x build.sh + RUN ./build.sh -ENTRYPOINT ["./govd"] +ENTRYPOINT ["./govd"] \ No newline at end of file