From 4b36ccffaa4f12d63948339d29c0365bd008d4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=91=D0=B0?= =?UTF-8?q?=D0=B4=D1=8F=D0=B5=D0=B2?= Date: Sun, 3 Nov 2024 19:05:52 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B0=20=D0=BF=D0=B0?= =?UTF-8?q?=D0=BA=D0=B5=D1=82=D0=B0=20=D0=B4=D0=BB=D1=8F=20arm32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 31 ------------------------------- makefile | 11 ++++++++--- 2 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a9a7894..0000000 --- a/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -# Start by building the application. -FROM docker.io/golang:1.22 AS build - -WORKDIR /usr/src/transocks -COPY . . - -RUN CGO_ENABLED=0 go build -trimpath -o transocks ./cmd/transocks - -# Now copy it into our base image. -FROM gcr.io/distroless/static-debian12:nonroot - -COPY --from=build /usr/src/transocks/transocks /usr/bin/transocks - -VOLUME [ "/etc/transocks" ] -ENTRYPOINT [ "/usr/bin/transocks" ] - -ARG IMAGE_CREATED -ARG IMAGE_VERSION -ARG IMAGE_REVISION - -LABEL org.opencontainers.image.created="${IMAGE_CREATED}" \ - org.opencontainers.image.authors="MouseSoft" \ - org.opencontainers.image.url="https://git.mousesoft.ru/alexey/transocks" \ - org.opencontainers.image.documentation="https://git.mousesoft.ru/alexey/transocks/src/branch/master/README.md" \ - org.opencontainers.image.source="https://git.mousesoft.ru/alexey/transocks" \ - org.opencontainers.image.version="${IMAGE_VERSION}" \ - org.opencontainers.image.revision="${IMAGE_REVISION}" \ - org.opencontainers.image.vendor="MouseSoft" \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.title="transocks - a transparent SOCKS5/HTTP proxy" \ - org.opencontainers.image.description="transocks is a background service to redirect TCP connections transparently to a SOCKS5 server or a HTTP proxy server like Squid." diff --git a/makefile b/makefile index 86179e9..c01ca63 100644 --- a/makefile +++ b/makefile @@ -33,6 +33,11 @@ DIST_EXT := .tar.gz DIST_OPTS := -czf PKG_NAME := $(PROJECT_ID)_$(VERSION)_$(GOOS)-$(GOARCH) DIST_FILE := $(PKG_NAME)$(DIST_EXT) +PKG_ARCH := $(GOARCH) + +ifeq ($(GOARCH),arm) + PKG_ARH := armv7l +endif GREEN := $(shell tput -Txterm setaf 2) YELLOW := $(shell tput -Txterm setaf 3) @@ -85,7 +90,7 @@ dist: ## Create binary distro package @$(ECHO_CMD) "Dist\t\t${GREEN}[OK]${RESET}" .PHONY:dist -DEB_NAME := $(PROJECT_ID)_$(VERSION_NUMBER)-1_$(GOARCH) +DEB_NAME := $(PROJECT_ID)_$(VERSION_NUMBER)-1_$(PKG_ARH) pkg-deb: ## Build debian package @rm -rf $(TMPDIR) @@ -96,9 +101,9 @@ pkg-deb: ## Build debian package @sed -e "s/VERSION/$(VERSION_NUMBER)/g" \ $(CURDIR)/build/package/debian/changelog.tpl \ > $(TMPDIR)/$(DEB_NAME)/changelog - @sed -e "s/ARCH/$(GOARCH)/g" $(CURDIR)/build/package/debian/control.tpl \ + @sed -e "s/ARCH/$(PKG_ARH)/g" $(CURDIR)/build/package/debian/control.tpl \ > $(TMPDIR)/$(DEB_NAME)/control - DEB_HOST_ARCH=$(GOARCH) dpkg-gencontrol -v$(VERSION_NUMBER)-1 \ + DEB_HOST_ARCH=$(PKG_ARH) dpkg-gencontrol -v$(VERSION_NUMBER)-1 \ -c$(TMPDIR)/$(DEB_NAME)/control \ -l$(TMPDIR)/$(DEB_NAME)/changelog \ -f$(TMPDIR)/$(DEB_NAME)/debian/files -Ptmp/$(DEB_NAME)