mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 02:21:34 +00:00
Add skeleton /sbin/proxy program
This will eventually contain the `docker-proxy` replacement. Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
parent
cedc6faa6e
commit
4ce4e978c6
@ -26,6 +26,7 @@ COPY kernel/kernel-source-info /etc/
|
||||
|
||||
COPY packages/9pudc/9pudc /sbin/
|
||||
COPY packages/9pudc/etc /etc/
|
||||
COPY packages/proxy/proxy /sbin/
|
||||
COPY packages/transfused/transfused /sbin/
|
||||
COPY packages/transfused/etc /etc/
|
||||
COPY packages/mdnstool/mdnstool /sbin/
|
||||
|
@ -1,5 +1,6 @@
|
||||
all:
|
||||
$(MAKE) -C 9pudc OS=linux
|
||||
$(MAKE) -C proxy OS=linux
|
||||
$(MAKE) -C transfused OS=linux
|
||||
$(MAKE) -C mdnstool OS=linux
|
||||
$(MAKE) -C hupper OS=linux
|
||||
@ -8,6 +9,7 @@ all:
|
||||
|
||||
arm:
|
||||
$(MAKE) -C 9pudc OS=linux ARCH=arm
|
||||
$(MAKE) -C proxy OS=linux ARCH=arm
|
||||
$(MAKE) -C transfused OS=linux ARCH=arm
|
||||
$(MAKE) -C mdnstool OS=linux ARCH=arm
|
||||
$(MAKE) -C hupper OS=linux ARCH=arm
|
||||
@ -15,6 +17,7 @@ arm:
|
||||
|
||||
clean:
|
||||
$(MAKE) -C 9pudc clean
|
||||
$(MAKE) -C proxy clean
|
||||
$(MAKE) -C transfused clean
|
||||
$(MAKE) -C mdnstool clean
|
||||
$(MAKE) -C docker clean
|
||||
|
1
alpine/packages/proxy/.gitignore
vendored
Normal file
1
alpine/packages/proxy/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/proxy
|
13
alpine/packages/proxy/Dockerfile
Normal file
13
alpine/packages/proxy/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM golang:alpine
|
||||
|
||||
RUN mkdir -p /go/src/proxy
|
||||
WORKDIR /go/src/proxy
|
||||
|
||||
COPY . /go/src/proxy/
|
||||
|
||||
ARG GOARCH
|
||||
ARG GOOS
|
||||
|
||||
RUN go install
|
||||
|
||||
RUN [ -f /go/bin/*/proxy ] && mv /go/bin/*/proxy /go/bin/ || true
|
10
alpine/packages/proxy/Makefile
Normal file
10
alpine/packages/proxy/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
all: proxy
|
||||
|
||||
proxy: Dockerfile main.go
|
||||
docker build --build-arg GOOS=$(OS) --build-arg GOARCH=$(ARCH) -t proxy:build .
|
||||
docker run --rm proxy:build cat /go/bin/proxy > proxy
|
||||
chmod 755 proxy
|
||||
|
||||
clean:
|
||||
rm -f proxy
|
||||
docker images -q proxy:build | xargs docker rmi -f
|
11
alpine/packages/proxy/README.md
Normal file
11
alpine/packages/proxy/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
docker-proxy which can set up tunnels into the VM
|
||||
=================================================
|
||||
|
||||
This is a replacement for the built-in `docker-proxy` command, which
|
||||
proxies data from external ports to internal container ports.
|
||||
|
||||
This program uses the 9P filesystem under /port to extend the port
|
||||
forward from the host running the Moby VM all the way to the container.
|
||||
|
||||
docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.2 -container-port 8080
|
||||
|
4
alpine/packages/proxy/main.go
Normal file
4
alpine/packages/proxy/main.go
Normal file
@ -0,0 +1,4 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
}
|
Loading…
Reference in New Issue
Block a user