forked from ms/transocks
Изменена сборка пакета для arm32
This commit is contained in:
parent
9792ba4376
commit
4b36ccffaa
31
Dockerfile
31
Dockerfile
@ -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."
|
11
makefile
11
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)
|
||||
|
Loading…
Reference in New Issue
Block a user