OpenRCT2 / OpenRCT2/openrct2-docker

Unable to execute commands

Open
#28 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
32
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Hi!

I'm running a server with the openrct2-cli docker image like this:

name: openrct
services:
    openrct2-cli:
        ports:
            - "11753:11753/tcp"
            - "11753:11753/udp"
            - "11754:11754/tcp"
        volumes:
            - ./config:/home/openrct2/.config
            - "./RollerCoaster Tycoon Deluxe:/home/openrct2/RollerCoaster Tycoon Deluxe"
            - "./Rollercoaster Tycoon 2:/home/openrct2/RollerCoaster Tycoon 2"
        stdin_open: true
        tty: true
        image: openrct2/openrct2-cli
        command: host /home/openrct2/.config/OpenRCT2/save/server.park

I've been trying to send save_park to the server by piping standard input directly using docker exec:

echo 'save_park' | docker exec -i openrct-openrct2-cli-1 sh -c "cat > /proc/1/fd/0"

Which shows up in the logs of the server:

openrct2-cli-1  | Listening for clients on *:11753
openrct2-cli-1  | console.executeLegacy("say Server restarting in 5 minutes!");
openrct2-cli-1  | console.executeLegacy("say Server restarting in 5 minutes!");
openrct2-cli-1  | say Server restarting in 5 minutes!
openrct2-cli-1  | save
openrct2-cli-1  | save
openrct2-cli-1  | save_park remote
openrct2-cli-1  | save_park
openrct2-cli-1  | save_park random-test
openrct2-cli-1  | save_park

I've tried many commands but nothing seems to actually execute or do anything?

How should I be calling a 'save my current park on the server' command?

Came here partial through https://github.com/OpenRCT2/OpenRCT2/issues/7549

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the docker-compose service and the docker exec pipeline shown in the issue, then inspect how the OpenRCT2 CLI host command reads standard input. Verify whether save_park reaches the server as an executable command rather than only appearing in logs. Done means documenting or confirming a command invocation that saves the current server park.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.