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

breaking(docker): move runme to /opt/bin/ #507

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

pastuxso
Copy link
Collaborator

@pastuxso pastuxso commented Feb 20, 2024

Relocate the runme executable to the /opt/bin directory and designate /opt/var/runme as the working directory. This adjustment prevents crashes resulting from accessing the root filesystem (/) when the image is used outside a multi-stage build.

The right way to use the docker image outside multi-stage builds is the following:

  • Use the default working directory:
    docker run -it --volume /your/runbooks:/opt/var/runme statefulhq/runme

  • Changing the working directory:
    docker run -it -w /runbooks --volume /your/runbooks:/runbooks statefulhq/runme

  • Passing the --project flag:
    docker run -it --volume /your/runbooks:/runbooks statefulhq/runme --project /runbooks

Sample:

image

Closes: #504

For multi-stage dependants that are using the binary from /runme it will be a breaking change.

@pastuxso pastuxso self-assigned this Feb 20, 2024
@pastuxso pastuxso changed the title Refactor Dockerfile: move 'runme' to /opt/ Refactor Dockerfile: move runme to /opt/ Feb 20, 2024
Copy link
Member

@sourishkrout sourishkrout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pastuxso see question

Dockerfile.alpine Outdated Show resolved Hide resolved
Move 'runme' executable to '/opt/' directory and set '/opt' as working directory

This commit updates the Dockerfiles for Alpine and Ubuntu images to move the 'runme' executable to the '/opt/' directory. Additionally, it sets the '/opt' directory as the working directory for the application.

Changes:
- Dockerfile.alpine: Moved 'runme' executable to '/opt/' directory and updated entrypoint to '/opt/runme'.
- Dockerfile.ubuntu: Moved 'runme' executable to '/opt/' directory and updated entrypoint to '/opt/runme'.

Closes: #504
Copy link

sonarcloud bot commented Feb 20, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@pastuxso pastuxso changed the title Refactor Dockerfile: move runme to /opt/ breaking(docker): move runme to /opt/bin/ Feb 20, 2024
Copy link
Member

@sourishkrout sourishkrout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM.

@pastuxso pastuxso merged commit 1989169 into main Feb 20, 2024
6 checks passed
@pastuxso pastuxso deleted the fix/docker-images branch February 20, 2024 16:00
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

Successfully merging this pull request may close these issues.

runme run fails with error in default location (docker image)
2 participants