Skip to content

Instantly share code, notes, and snippets.

@gizmotronic
Last active April 10, 2019 23:25
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 gizmotronic/224f8b0ff0d22437f08be7bb1f6e3c8a to your computer and use it in GitHub Desktop.
Save gizmotronic/224f8b0ff0d22437f08be7bb1f6e3c8a to your computer and use it in GitHub Desktop.
How to run the official Atlassian Bamboo Server image using a context path

How to run Atlassian Bamboo Server using a context path

  1. Build a custom Docker image using the provided Dockerfile.
    • Make sure you update the source image in the FROM line.
    • Update com.example to use your organization's domain.
  2. Run the container with the JVM_SUPPORT_RECOMMENDED_ARGS environment variable set
    • Include -Dcom.example.catalina.ContextPath=mypath in the value.
    • The context path mypath should not start with a slash.
    • If you updated com.example above (recommended), use the same variable name here as well.

Example

docker build -t acmecorp/bamboo-server:6.8.1 .
docker run -d -e JVM_SUPPORT_RECOMMENDED_ARGS="-Dcom.example.catalina.ContextPath=bamboo" acmecorp/bamboo-server:6.8.1

Give it a minute or two to start up. Then, assuming Bamboo Server is running on a machine named www.example.com, you should be able to access Bamboo Server at http://www.example.com/bamboo.

FROM atlassian/bamboo-server:6.8.1
LABEL maintainer="alex.smythe@example.com"
RUN sed -i -e 's/Context path=""/Context path="${com.example.catalina.ContextPath}"/' ${BAMBOO_SERVER_INSTALL_DIR}/conf/server.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment