Closed fdicencio closed 2 years ago
Hi, please help! Make filed
make go mod tidy go: github.com/spf13/viper@v1.7.1 requires github.com/prometheus/client_golang@v0.9.3 requires github.com/prometheus/common@v0.4.0 requires github.com/mwitkow/go-conntrack@v0.0.0-20161129095857-cc309e4a2223: invalid version: git fetch --unshallow -f origin in /root/go/pkg/mod/cache/vcs/ff07aa22658f49e63fef8f4c0d0db965b4d9e57f277988d8c2420beb7ba2768b: exit status 128: fatal: git fetch-pack: expected shallow list make: *** [mod] Ошибка 1
I tried to make image with Portainer. The output:
Step 1/10 : FROM debian:buster-slim ---> 80b9e7aadac5
Step 2/10 : RUN apt-get update && apt-get install -y git golang openssl curl && random=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) && openssl genrsa -des3 -passout pass:$random -out server.pass.key 2048 && openssl rsa -passin pass:$random -in server.pass.key -out key.pem && rm server.pass.key && openssl req -new -sha256 -key key.pem -out server.csr -subj "/C=US/ST=VA/L=SomeCity/O=MyCompany/OU=MyDivision/CN=localhost" && openssl x509 -req -days 365 -in server.csr -signkey key.pem -out server.pem
---> Using cache ---> d4111b38873d Step 3/10 : RUN curl -L https://dl.google.com/go/go1.14.7.linux-amd64.tar.gz -o golang.tgz && tar zxvf golang.tgz && rm golang.tgz
---> Using cache ---> c7d460f848bc
Step 4/10 : RUN git clone https://github.com/bolkedebruin/rdpgw.git && cd rdpgw && env GOOS=linux GOARCH=amd64 GOROOT=/go /go/bin/go build && mkdir -p /opt/rdpgw && mv rdpgw /opt/rdpgw/rdpgw && rm -rf /root/go && rm -rf /rdpgw
---> Running in e5735cbc46d7 Cloning into 'rdpgw'... can't load package: package .: no Go files in /rdpgw
The command '/bin/sh -c git clone https://github.com/bolkedebruin/rdpgw.git && cd rdpgw && env GOOS=linux GOARCH=amd64 GOROOT=/go /go/bin/go build && mkdir -p /opt/rdpgw && mv rdpgw /opt/rdpgw/rdpgw && rm -rf /root/go && rm -rf /rdpgw' returned a non-zero code: 1
And one Information: The Go version is out of date, see https://dl.google.com/go/
I think the Dockerfile is corrupt.
The part produces errors:
RUN git clone https://github.com/bolkedebruin/rdpgw.git && \
cd rdpgw && \
env GOOS=linux GOARCH=amd64 GOROOT=/go /go/bin/go build && \
mkdir -p /opt/rdpgw && \
mv rdpgw /opt/rdpgw/rdpgw && \
rm -rf /root/go && \
rm -rf /rdpgw
The part env GOOS=linux GOARCH=amd64 shows definitly wrong. ENV is an seperatly command to build the docker container.
you can try that one @Azathoth88 ` RUN curl -L https://dl.google.com/go/go1.17.5.linux-amd64.tar.gz -o golang.tgz && \ tar zxvf golang.tgz && rm golang.tgz
RUN git clone https://github.com/bolkedebruin/rdpgw.git && \ cd rdpgw && \ env GOOS=linux GOARCH=amd64 GOROOT=/go /go/bin/go mod tidy && \ env GOOS=linux GOARCH=amd64 GOROOT=/go /go/bin/go build -trimpath -tags '' -ldflags '' -o '/rdpgw/bin/rdpgw' ./cmd/rdpgw && \ mkdir -p /opt/rdpgw && \ mv /rdpgw/bin/rdpgw /opt/rdpgw/rdpgw && \ rm -rf /root/go && \ rm -rf /rdpgw `
adjusted the docker compose and Dockerfile that should work just fine with docker-compose up
@krisss85 thank you very much!
Hie, Thanks a lot for your project I'll try to find a substitute to MS RDP Gateway to connect to single desktops. I try to install RDPGW to a raspberry pi 3 with raspbian. In this raspberry I have a functional installation of apache with a c# webservice in mono from a project of mine. I have installed GO 1.16 but when I try to make your project it return to me this errors: "cmd/rdpgw/protocol/server.go:321:3: constant 2147483648 overflows int make: *** [Makefile:37: /home/pi/rdpgw-master/bin/rdpgw] Error 2" Where I was wrong? Thanks a lot, Francesco