Dockerfile.debian 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright 2021 EMQ Technologies Co., Ltd.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. FROM debian:bullseye
  15. ARG GO_VERSION
  16. ARG DEBIAN_FRONTEND="noninteractive"
  17. RUN apt-get update \
  18. && apt-get install -y make wget git curl procps zip libucl-dev zlib1g-dev \
  19. pkg-config libczmq-dev build-essential debhelper jq zip
  20. RUN case $(dpkg --print-architecture) in \
  21. arm|armhf|armv7) \
  22. ARCH=armv6l \
  23. ;; \
  24. *) \
  25. ARCH=$(dpkg --print-architecture)\
  26. ;; \
  27. esac \
  28. && wget --no-verbose https://golang.org/dl/go$GO_VERSION.linux-$ARCH.tar.gz \
  29. && tar -C /usr/local -xzf go$GO_VERSION.linux-$ARCH.tar.gz
  30. ENV PATH=$PATH:/usr/local/go/bin
  31. RUN wget --no-verbose https://github.com/upx/upx/releases/download/v3.96/upx-3.96-src.tar.xz -O - | tar -xvJC /usr/local \
  32. && cd /usr/local/upx-3.96-src && make all \
  33. && ln -s /usr/local/upx-3.96-src/src/upx.out /usr/bin/upx