Skip to content

SOLR-15685: Add Devcontainer to make building easier#339

Closed
TheSench wants to merge 2 commits into
apache:mainfrom
TheSench:feature/SOLR-15685-add-devcontainer
Closed

SOLR-15685: Add Devcontainer to make building easier#339
TheSench wants to merge 2 commits into
apache:mainfrom
TheSench:feature/SOLR-15685-add-devcontainer

Conversation

@TheSench
Copy link
Copy Markdown
Contributor

@TheSench TheSench commented Oct 10, 2021

https://issues.apache.org/jira/browse/SOLR-15685

Description

This PR adds a .devcontainer, which provides a Docker Perl/JDK11 build environment. This can be used for new/infrequent contributors to quickly get up and running without needing to install any build tools.

Solution

Using VSCode's Remote Development extension to add the Perl .devcontainer (includes Perl 5). I then updated the auto-generated Dockerfile to include the Java 11 JDK. With these changes, I am able to assemble Solr inside a Docker container without needing to install any other build tools on my machine.

Tests

I started up the container and ran gradlew assemble inside of it. Once the build finished, I ran the generated bin/solr to verify that Solr was able to start.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.

N/A I have added tests for my changes.

This allows developers to start up the project inside a Docker container and run the build without needing to install any build tools to their machine.
This .devcontainer was generated by selecting the standard Perl image, and then updating the Dockerfile to also install JDK 11.
@TheSench
Copy link
Copy Markdown
Contributor Author

Not sure what the proper way to proceed is regarding the license in the common-debian.sh script that gets autogenerated. It is licensed under the MIT license. If this change is not something we want to add, I think the proper alternative would be to add .devcontainer/ to the .gitignore so that individual developers can choose to use one without accidentally committing it.

@janhoy janhoy changed the title Feature/solr 15685 add devcontainer SOLR-15685 add devcontainer Nov 9, 2021
@risdenk risdenk changed the title SOLR-15685 add devcontainer SOLR-15685: Add Devcontainer to make building easier Oct 27, 2022
@github-actions
Copy link
Copy Markdown

This PR had no visible activity in the past 60 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the dev@solr.apache.org mailing list. Thank you for your contribution!

@github-actions github-actions Bot added the stale PR not updated in 60 days label Feb 24, 2024
@TheSench TheSench closed this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR not updated in 60 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant