Hi, everyone! Another question: is it possible to ...
# ask-the-community
m
Hi, everyone! Another question: is it possible to start the sandbox without using flytectl? A member of my team is using Windows and wants to try Flyte. I was trying to accomplish this by starting the sandbox with Docker Compose, and having another container to communicate with it. I was able to run simple commands such as
flytectl create
and
flytectl get
from the container, but I can't build images, and I think the problem is on the sandbox side, since I can't do that even on my host machine. I get the error:
Copy code
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "docker": executable file not found in $PATH: unknown
This is the configuration for the sandbox. What am I missing?
Copy code
services:
  flyte-sandbox:
    image: <http://cr.flyte.org/flyteorg/flyte-sandbox:latest|cr.flyte.org/flyteorg/flyte-sandbox:latest>
    container_name: flyte-sandbox
    privileged: true
    volumes:
      - ..:/usr/src           # The docker-compose file is inside a sandbox/ dir
    ports:
      - "30081:30081"         # Console at <http://localhost:30081/console>
      - "30084:30084"
      - "30088:30088"
s
cc: @Yuvraj / @Prafulla Mahindrakar
y
@Matheus Moreno
latest
tag is old and deprecated, We don’t publish new images with tag
latest
, In past it represent non dind sandbox, Now we only publish DIND images check here https://github.com/flyteorg/flyte/pkgs/container/flyte-sandbox
m
Oh, ok! I'll fix that. But what about everything else? I just ran
flytectl sandbox start
and tried to configure the Docker Compose file based on the
docker inspect
result. My questions: • The
~/.flyte/k3s
files exist so I can use kubectl on the sandbox, right? Is it possible to manually generate them, i.e. without
flyte sandbox start
? • Do I need to mount the volume on
~/.flyte
on
/etc/rancher
for the system to work? This kinda ties in with the previous question.
y
Please add your docker-compose file in thread ?
m
Hi! I was able to make almost everything work with this configuration:
Copy code
services:
  sandbox:
    image: <http://cr.flyte.org/flyteorg/flyte-sandbox:dind|cr.flyte.org/flyteorg/flyte-sandbox:dind>
    container_name: flyte-sandbox
    privileged: true
    volumes:
      - ..:/root
      - sandbox-config:/etc/rancher
    # entrypoint: sh -c 'chmod -R u+rwX,go+rX,go-w /etc/rancher && tini flyte-entrypoint.sh'
    ports:
      - "30081:30081"         # Console at <http://localhost:30081/console>
      - "30082:30082"
      - "30084:30084"
      - "30086:30086"
      - "30087:30087"
      - "30088:30088"
My only problem now is making the
k3s.yaml
file accessible to my user container, since it is running as a non-root user, and the k3s file is owned by root. But it seems that the only limitation this causes is that I cannot send
kubectl
commands to the sandbox, and that is not a huge problem. Thank you for your help!
y
Yes i am aware about the non-root user issue, For now you can use kubectl command inside the sandbox like
Copy code
docker exec -it flyte-sandbox -- k3s kubectl get pods -n flyte
m
Thank you!
123 Views