I want to set up a server with wireguard to use VPN from mobile devices, but when I start it I get the error Error: failed to spawn command: /init-wrapper: No such file or directory (os error 2)

Why can’t I start wireguard vpn server on fly?
When I deployed a got Error: failed to spawn command: /init-wrapper: No such file or directory (os error 2)


FROM ubuntu

RUN apt-get update && apt-get install -y xz-utils

ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz

COPY init-wrapper /
ENTRYPOINT ["/init-wrapper"]


# run /init with PID 1, creating a new PID namespace if necessary
if [ "$$" -eq 1 ]; then
    # we already have PID 1
    exec /init "$@"
    # create a new PID namespace
    exec unshare --pid sh -c '
        # set up /proc and start the real init in the background
        unshare --mount-proc /init "$@" &
        # forward signals to the real init
        trap "kill -INT \$child" INT
        trap "kill -TERM \$child" TERM
        # wait until the real init exits
        # ("wait" returns early on signals; "kill -0" checks if the process exists)
        until wait "$child" || ! kill -0 "$child" 2>/dev/null; do :; done
    ' sh "$@"


app = "name"
primary_region = "ams"

  dockerfile = "./Dockerfile"

  LOG_CONFS = "true"
  PEERDNS = "auto"
  PEERS = "1"
  PGID = "1000"
  PUID = "1000"
  SERVERPORT = "51820"

  source = "config"
  destination = "/config"
  auto_extend_size_threshold = 0

  protocol = "udp"
  internal_port = 51820

    port = 51820
    type = "connections"
    hard_limit = 25
    soft_limit = 20

  cpu_kind = "shared"
  cpus = 1
  memory_mb = 512

Also i got message: does /init-wrapper exist and is it executable?
/init, /init-wrapper exist and executable, I checked it twice.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.