Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't figure out how to launch ovpn-admin after installing it using Docker #283

Open
arslaman opened this issue Aug 27, 2024 · 1 comment

Comments

@arslaman
Copy link

I already had OpenVPN on my Ubuntu server and I decided to install the ovpn-admin using Docker but couldn't figure out how to launch the admin panel since bash said there's no file:

root@OpenVPN:~/ovpn-admin# ./ovpn-admin
-bash: ./ovpn-admin: No such file or directory

Here's a full log of installation and the attempt to launch it:

root@OpenVPN:~# git clone https://github.com/flant/ovpn-admin.git
Cloning into 'ovpn-admin'...
remote: Enumerating objects: 887, done.
remote: Counting objects: 100% (418/418), done.
remote: Compressing objects: 100% (151/151), done.
remote: Total 887 (delta 354), reused 268 (delta 267), pack-reused 469 (from 1)
Receiving objects: 100% (887/887), 1.05 MiB | 6.77 MiB/s, done.
Resolving deltas: 100% (524/524), done.
root@OpenVPN:~# cd ovpn-admin
root@OpenVPN:~/ovpn-admin# ./start.sh
WARN[0000] /root/ovpn-admin/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Building 100.6s (30/30) FINISHED                                                                                                 docker:default
 => [openvpn internal] load build definition from Dockerfile.openvpn                                                                           0.0s
 => => transferring dockerfile: 637B                                                                                                           0.0s
 => [ovpn-admin internal] load metadata for docker.io/library/alpine:3.16                                                                      0.8s
 => [openvpn internal] load .dockerignore                                                                                                      0.0s
 => => transferring context: 329B                                                                                                              0.0s
 => [ovpn-admin stage-2 1/5] FROM docker.io/library/alpine:3.16@sha256:452e7292acee0ee16c332324d7de05fa2c99f9994ecc9f0779c602916a672ae4        0.0s
 => [openvpn internal] load build context                                                                                                      0.0s
 => => transferring context: 3.09kB                                                                                                            0.0s
 => CACHED [openvpn 2/5] RUN apk add --update bash openvpn easy-rsa iptables  &&     ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin &&       0.0s
 => CACHED [openvpn 3/5] RUN if [ -f "/usr/local/bin/openvpn-user-amd64" ]; then ln -s /usr/local/bin/openvpn-user-amd64 /usr/local/bin/openv  0.0s
 => CACHED [openvpn 4/5] COPY setup/ /etc/openvpn/setup                                                                                        0.0s
 => CACHED [openvpn 5/5] RUN chmod +x /etc/openvpn/setup/configure.sh                                                                          0.0s
 => [openvpn] exporting to image                                                                                                               0.0s
 => => exporting layers                                                                                                                        0.0s
 => => writing image sha256:fde3247d09dfc4b5d3cba173dbb4a2c54fab8b08c9dacfa53b0e9d929c285972                                                   0.0s
 => => naming to docker.io/library/openvpn:local                                                                                               0.0s
 => [openvpn] resolving provenance for metadata file                                                                                           0.0s
 => [ovpn-admin internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 1.15kB                                                                                                         0.0s
 => [ovpn-admin internal] load metadata for docker.io/library/node:16-alpine3.15                                                               0.6s
 => [ovpn-admin internal] load metadata for docker.io/library/golang:1.17.3-buster                                                             0.7s
 => [ovpn-admin internal] load .dockerignore                                                                                                   0.0s
 => => transferring context: 329B                                                                                                              0.0s
 => [ovpn-admin frontend-builder 1/3] FROM docker.io/library/node:16-alpine3.15@sha256:ecf74556cdeee48382e555a377ddb12d36161bd33349dc79290f73  0.0s
 => [ovpn-admin internal] load build context                                                                                                   0.1s
 => => transferring context: 1.67MB                                                                                                            0.0s
 => [ovpn-admin backend-builder 1/5] FROM docker.io/library/golang:1.17.3-buster@sha256:ee3a388a872237ddb600de3ab9512e73df0043f8878f0f355baeb  0.0s
 => CACHED [ovpn-admin backend-builder 2/5] RUN go install github.com/gobuffalo/packr/v2/packr2@latest                                         0.0s
 => CACHED [ovpn-admin frontend-builder 2/3] COPY frontend/ /app                                                                               0.0s
 => CACHED [ovpn-admin frontend-builder 3/3] RUN apk add --update python3 make g++ && cd /app && npm install && npm run build                  0.0s
 => CACHED [ovpn-admin backend-builder 3/5] COPY --from=frontend-builder /app/static /app/frontend/static                                      0.0s
 => [ovpn-admin backend-builder 4/5] COPY . /app                                                                                               0.1s
 => [ovpn-admin backend-builder 5/5] RUN cd /app && packr2 && env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-l  97.5s
 => CACHED [ovpn-admin stage-2 2/5] WORKDIR /app                                                                                               0.0s 
 => CACHED [ovpn-admin stage-2 3/5] COPY --from=backend-builder /app/ovpn-admin /app                                                           0.0s 
 => CACHED [ovpn-admin stage-2 4/5] RUN apk add --update bash easy-rsa openssl openvpn coreutils  &&     ln -s /usr/share/easy-rsa/easyrsa /u  0.0s 
 => CACHED [ovpn-admin stage-2 5/5] RUN if [ -f "/usr/local/bin/openvpn-user-amd64" ]; then ln -s /usr/local/bin/openvpn-user-amd64 /usr/loca  0.0s 
 => [ovpn-admin] exporting to image                                                                                                            0.0s 
 => => exporting layers                                                                                                                        0.0s 
 => => writing image sha256:cd6ba3b1a0147acd08f95d3fc1ff9b8e85bad20bd09f48a038c2fff560fc62df                                                   0.0s
 => => naming to docker.io/library/ovpn-admin:local                                                                                            0.0s
 => [ovpn-admin] resolving provenance for metadata file                                                                                        0.2s
[+] Running 2/2
 ✔ Container openvpn-master-openvpn-1     Started                                                                                              0.8s 
 ✔ Container openvpn-master-ovpn-admin-1  Started                                                                                              1.1s 
root@OpenVPN:~/ovpn-admin# ovpn-admin
ovpn-admin: command not found
root@OpenVPN:~/ovpn-admin# ./ovpn-admin
-bash: ./ovpn-admin: No such file or directory

I'm on Ubuntu 24.04 and here's docker version:

root@OpenVPN:~/ovpn-admin# docker version
Client: Docker Engine - Community
 Version:           27.1.2
 API version:       1.46
 Go version:        go1.21.13
 Git commit:        d01f264
 Built:             Mon Aug 12 11:50:54 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          27.1.2
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.21.13
  Git commit:       f9522e5
  Built:            Mon Aug 12 11:50:54 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.20
  GitCommit:        8fc6bcff51318944179630522a095cc9dbf9f353
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

And here's running docker containers:

root@OpenVPN:~/ovpn-admin# docker container ls -a
CONTAINER ID   IMAGE              COMMAND                  CREATED        STATUS                      PORTS     NAMES
b57a6704954f   ovpn-admin:local   "/app/ovpn-admin"        10 hours ago   Up 16 minutes                         openvpn-master-ovpn-admin-1
78d5ad171d20   openvpn:local      "/etc/openvpn/setup/…"   10 hours ago   Exited (1) 16 minutes ago             openvpn-master-openvpn-1
11028400fadb   hello-world        "/hello"                 10 hours ago   Exited (0) 10 hours ago               jolly_lumiere
@DavidFFerreira
Copy link

same problema, have no ideia now what to do....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants