Skip to content

Instantly share code, notes, and snippets.

@dariusf
Created March 29, 2018 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dariusf/065d45c2e6b8eea3d1fcba13cca99c97 to your computer and use it in GitHub Desktop.
Save dariusf/065d45c2e6b8eea3d1fcba13cca99c97 to your computer and use it in GitHub Desktop.
TEAMMATES
FROM openjdk:8
# Has Java, Python, git
# This installs lsb_release
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && apt-get install -y nodejs
# Install Google Cloud SDK
RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update -y && apt-get install google-cloud-sdk google-cloud-sdk-app-engine-java -y
EXPOSE 8080
# Setup
git clone git@github.com:TEAMMATES/teammates.git
cd teammates
docker build -t teammates .
# Start dev server directly
docker run -it --rm -w /src -v ~/.gradle:/root/.gradle -v $(PWD):/src -p 8080:8080 --entrypoint="./start.sh" teammates
# Just start bash
docker run -it --rm -w /src -v ~/.gradle:/root/.gradle -v $(PWD):/src -p 8080:8080 teammates
#!/bin/bash
set -e
npm install
./gradlew createConfigs
npm run build
./gradlew appengineRun -Pappengine.run.host=0.0.0.0
@dariusf
Copy link
Author

dariusf commented Mar 29, 2018

For debugging support, pass these flags into here and expose another port. Gradle doesn't parse string lists, so some manual work is needed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment