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

Adds Dockerfile and docker-compose.yml for building and testing #369

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ onebusaway-admin-webapp/overlays/
onebusaway-enterprise-acta-webapp/overlays/

onebusaway-enterprise-webapp/overlays/

build/*
!build/.gitkeep
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ When you are submitting code to OneBusAway, here are a few guidelines to go by:
* For each commit to the repository, reference the issue number in the commit message. Something like `Issue #5: Adding this cool feature`. This will automatically link your commit to the issue and make it easier to track changes to the codebase.
* Code style: check out the [Code Style](https://github.com/OneBusAway/onebusaway/wiki/Code-Style) documentation for details on how configure your IDE to match the OneBusAway code-style conventions. In general, try to match the existing code style when adding new code.
* Write unit tests.
* Don't break the build. You can run `mvn verify` to run all the unit tests and checks for a Maven project to verify that your changes haven't broken anything. Also keep an eye on our [Continuous Integration Server](http://ci.onebusaway.org/). Some projects also have Travis CI added, which provides an additional reference for builds.
* Don't break the build. You can run `mvn verify` to run all the unit tests and checks for a Maven project to verify that your changes haven't broken anything.
* Code reviews. If you are new to OneBusAway development or if you are working on a core piece of OneBusAway, it's a good idea to get someone to do a codereview of your change before committing it to the master repository. GitHub makes codereviews pretty simple with their [Pull Request](https://help.github.com/articles/using-pull-requests) feature.

## Commit Access
Expand Down
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright (C) 2012 Brian Ferris <bdferris@onebusaway.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM maven:3-eclipse-temurin-11

# Install additional development tools if needed
RUN apt-get update && apt-get install -y \
git \
vim \
&& rm -rf /var/lib/apt/lists/*

mkdir -p /root/.m2/repository

WORKDIR /src

# Set the entrypoint to bash so the container doesn't exit immediately
ENTRYPOINT ["/bin/bash"]
3 changes: 0 additions & 3 deletions README

This file was deleted.

16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ There are two options for setting up your own OneBusAway instance:
* [Configuration and Deployment Guide for v2.x](https://github.com/OneBusAway/onebusaway/wiki/Configuration-and-Deployment-Guide-for-v2.x) - Designed to provide a comprehensive deployment method for users who wish to set up a simple OneBusAway application with minimal configurations.
* [onebusaway-docker (Under development)](https://github.com/OneBusAway/onebusaway-docker) - A community-supported Docker configuration for OneBusAway v2.x is currently under development.

## Docker Development Instructions

Build the image:

```
docker build -t oba-app-modules .
docker exec -it onebusaway-application-modules-builder-1 /bin/bash
./build-and-test.sh
```



## Status

* Latest Stable Release - `2.4.18-cs`:
Expand Down Expand Up @@ -92,8 +104,8 @@ To create a local copy of the repository, use the following command:
* IRC channel:
- `#onebusaway` on Freenode
- You can connect using your favorite IRC client or [chat through the web](http://webchat.freenode.net/?channels=onebusaway) (just enter a username and click *Connect*)


## Contact Info

There are [lots of ways to get in touch with us](https://github.com/OneBusAway/onebusaway/wiki/Contact-Us).
There are [lots of ways to get in touch with us](https://github.com/OneBusAway/onebusaway/wiki/Contact-Us).
23 changes: 23 additions & 0 deletions build-and-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
#
# Copyright (C) 2012 Brian Ferris <bdferris@onebusaway.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

mvn -U clean install \
-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 \
-Dlicense.skip=true \
-Dmaven.javadoc.skip=true \
-Dvalidate.silent=true \
-Dlog4j.configuration=
24 changes: 24 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
#
# Copyright (C) 2012 Brian Ferris <bdferris@onebusaway.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

mvn -U clean install \
-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 \
-DskipTests=true \
-Dlicense.skip=true \
-Dmaven.javadoc.skip=true \
-Dvalidate.silent=true \
-Dlog4j.configuration=
Empty file added build/.gitkeep
Empty file.
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
builder:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./build:/root/.m2/repository
- .:/src
stdin_open: true
tty: true
Loading