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

Dockerfile to work on centos7 locally #979

Merged
merged 3 commits into from
Jan 10, 2025
Merged

Conversation

JasonMarechal25
Copy link
Contributor

@JasonMarechal25 JasonMarechal25 commented Jan 2, 2025

This pull request introduces a new setup for building xpansion in a CentOS 7 environment using Docker. The changes include a README file with detailed instructions, a build script, a Dockerfile, and a run script.

The most important changes include:

Documentation:

  • docker/centos-local-build/README.MD: Added a comprehensive guide on how to locally generate a CentOS 7 asset, including prerequisites, usage instructions, and advanced usage scenarios.

Build Script:

  • docker/centos-local-build/build.sh: Introduced a script to build and generate the asset, including setting up directories, downloading dependencies, and configuring the build environment.

Docker Configuration:

Run Script:

@JasonMarechal25 JasonMarechal25 requested review from tbittar and a team January 2, 2025 16:05
Comment on lines 3 to 4
--mount type=bind,src=/home/marechaljas/CLionProjects/antares-xpansion,dst=/mnt/sources \
--mount type=bind,src=/home/marechaljas/CLionProjects/docker_caches,dst=/mnt/caches \
Copy link
Contributor

Choose a reason for hiding this comment

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

you put your folder names here, was it intentional as an example? in that case, maybe add a mention in the readme

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I've updated to now accept parameters

Copy link
Contributor

@pet-mit pet-mit left a comment

Choose a reason for hiding this comment

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

seems ok but generated artifacts belong to root. you have to switch the user in the dockerfile to a non-root user :
image

tar -czf antares-xpansion-centos.tar.gz -C $install_dir . --exclude='examples'
chmod 777 antares-xpansion-centos.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

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

also remove all other files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

which "all other files" ?

Copy link
Contributor

Choose a reason for hiding this comment

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

on my PC the build folder ends up like this :
image

if I understand well, only the archive is needed. you can delete the 4 dirs ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. The point of having them in this directory instead of the container is to be able to reuse them in subsequent build. Especially the vcpkg cache.

@JasonMarechal25 JasonMarechal25 merged commit 3f84ae6 into develop Jan 10, 2025
25 checks passed
@JasonMarechal25 JasonMarechal25 deleted the feature/docker_local branch January 10, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants