running your own cyber-dojo server

This page related to an old-version of cyber-dojo.
This is the page you're looking for

16 comments:

  1. I got a error when run ./cyber-dojo up ,ERROR: Service "web" mounts volumes from "cdf-katas-DATA-CONTAINER", which is not the name of a service or container.

    ReplyDelete
  2. Hi Tomy,
    thanks for reporting this.
    Are you installing on Windows? Mac? Linux?
    cdf-katas-DATA-CONTAINER is indeed not a service named in the docker-compose.yml file
    It should have been started with the [docker create] command on line 75 of the cyber-dojo script.
    Could you change line 1 on cyber-dojo to
    #!/bin/sh -x
    re-run and report what it says?
    Thanks

    ReplyDelete
    Replies
    1. I run this script on mac, I got fllow:

      creating new empty cdf-katas-DATA-CONTAINER
      + SUFFIX=empty
      + CONTEXT_DIR=.
      + KATAS_DOCKERFILE=./Dockerfile.katas-data-container
      ++ docker create cyberdojofoundation/web
      + CID=3f0c74e7ebb3db0d9130a38bb278953b148a1b713fec4126dbc657ef22b07015
      + docker cp 3f0c74e7ebb3db0d9130a38bb278953b148a1b713fec4126dbc657ef22b07015:/usr/src/cyber-dojo/app/docker/Dockerfile.katas-data-container.empty ./Dockerfile.katas-data-container
      + docker rm -v 3f0c74e7ebb3db0d9130a38bb278953b148a1b713fec4126dbc657ef22b07015
      + TAG=cyberdojofoundation/katas
      + docker build --build-arg=CYBER_DOJO_KATAS_ROOT=/usr/src/cyber-dojo/katas --tag=cyberdojofoundation/katas --file=./Dockerfile.katas-data-container .
      Error checking context: 'no permission to read from '/Users/tomyli/.nviminfo''.
      + docker create --name cdf-katas-DATA-CONTAINER cyberdojofoundation/katas echo cdfKatasDC
      Unable to find image 'cyberdojofoundation/katas:latest' locally
      Pulling repository docker.io/cyberdojofoundation/katas
      Error: image cyberdojofoundation/katas not found
      + docker run --rm --user=root --volume=/var/run/docker.sock:/var/run/docker.sock cyberdojofoundation/web /usr/src/cyber-dojo/app/docker/cyber-dojo.rb up
      + DOCKER_COMPOSE_FILE=docker-compose.yml
      ++ docker create cyberdojofoundation/web
      + CID=86b2a29d3fe28601d13839d858072e7642737898f14a8958e75ca69d875bc44a
      + docker cp 86b2a29d3fe28601d13839d858072e7642737898f14a8958e75ca69d875bc44a:/usr/src/cyber-dojo/app/docker/docker-compose.yml /Users/tomyli/docker-compose.yml
      + docker rm -v 86b2a29d3fe28601d13839d858072e7642737898f14a8958e75ca69d875bc44a
      + export CYBER_DOJO_HOME=/usr/src/cyber-dojo
      + CYBER_DOJO_HOME=/usr/src/cyber-dojo
      + export CYBER_DOJO_KATAS_CLASS=HostDiskKatas
      + CYBER_DOJO_KATAS_CLASS=HostDiskKatas
      + export CYBER_DOJO_KATAS_ROOT=/usr/src/cyber-dojo/katas
      + CYBER_DOJO_KATAS_ROOT=/usr/src/cyber-dojo/katas
      + export CYBER_DOJO_RUNNER_CLASS=DockerTarPipeRunner
      + CYBER_DOJO_RUNNER_CLASS=DockerTarPipeRunner
      + export 'CYBER_DOJO_RUNNER_SUDO=sudo -u docker-runner sudo'
      + CYBER_DOJO_RUNNER_SUDO='sudo -u docker-runner sudo'
      + export CYBER_DOJO_RUNNER_TIMEOUT=10
      + CYBER_DOJO_RUNNER_TIMEOUT=10
      + DOCKER_COMPOSE_CMD='docker-compose --file=/Users/tomyli/docker-compose.yml'
      + '[' up = up ']'
      + docker-compose --file=/Users/tomyli/docker-compose.yml up -d
      ERROR: Service "web" mounts volumes from "cdf-katas-DATA-CONTAINER", which is not the name of a service or container.
      + '[' up = down ']'
      + '[' up = upgrade ']'

      Delete
    2. Hi Tomy,
      the first line that fails is
      Error checking context: 'no permission to read from '/Users/tomyli/.nviminfo''.

      This error comes from line 68 [docker build ...] of the cyber-dojo script.
      The error suggests that you have run the [cyber-dojo] script while in the folder /Users/tomyli
      and that the user you are running the [cyber-dojo] command as does not have the rights to read from the /Users/tomyli folder.
      What user are you running the [cyber-dojo] script as?


      Delete
    3. I run the cyber-dojo script in the folder /Users/tomyli!

      Delete
    4. Ok.
      1. What user are you? It's a permission problem.

      2. I've made a patch which may help. Please recurl the cyber-dojo script, run the command [docker rmi cyberdojofoundation/web] and retry the installation.

      Cheers
      Jon

      Delete
    5. I run that success! Thank you very very very much!

      Delete
  3. How can I add new language not in list?

    ReplyDelete
    Replies
    1. See http://blog.cyber-dojo.org/2014/09/adding-new-language-and-unit-test-to-cyber-dojo.html

      Delete
  4. I'm on Mac, using Docker Toolbox. Is it possible you are missing a step in the instructions? I don't see where you tell the user to:
    'docker pull cyberdojofoundation/web:*tag*' where *tag* is, for example, the version from the 'docker --version' command.

    ReplyDelete
  5. Hi Jeff,
    you don't have to issue that command because when [docker RUN .... cyberdojofoundation/web:tag] is run for the first time the docker daemon will do the [docker pull] for you.
    Cheers
    Jon

    ReplyDelete
    Replies
    1. And *that* happens the first time I [cyber-dojo up]? And the script checks what version of docker it is running in and pulls that tag?

      Delete
  6. Replies
    1. Cool, thanks! I think I was confused by the "Please note:" section. It's good information, I just don't have to do anything with it for the "happy path" install to work properly.

      BTW: I really like cyber-dojo. THANKS!

      Delete
  7. My pleasure. By the way, future releases will be from https://github.com/cyber-dojo/web

    ReplyDelete