run.sh
#!/bin/sh wget $BAMBOO_SERVER:$BAMBOO_SERVER_PORT/agentServer/agentInstaller/atlassian-bamboo-agent-installer-$BAMBOO_VERSION.jar java -jar ./atlassian-bamboo-agent-installer-$BAMBOO_VERSION.jar $BAMBOO_SERVER:$BAMBOO_SERVER_PORT/agentServer/
docker-compose.yml
version: '3.6'
services:
docker_agent:
restart: always
privileged: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
build:
context: .README.md
mkdir -p ./bamboo-agent
cd ./bamboo-agent
wget https://bitbucket.atican.dev/snippets/f7656d82e2d14c0e8c796fa92461831f/download
mv download bamboo-agent.zip
unzip bamboo-agent.zip
docker-compose up -d
Dockerfile
FROM docker:stable
ENV BAMBOO_SERVER https://bamboo.atican.dev
ENV BAMBOO_SERVER_PORT 443
ENV BAMBOO_VERSION 7.2.3
RUN apk add --update --no-cache libffi-dev openssl-dev gcc libc-dev make git openssh openjdk8-jre ca-certificates wget
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk
RUN apk add glibc-2.31-r0.apk && rm glibc-2.31-r0.apk
ENV LD_LIBRARY_PATH=/lib:/usr/lib
RUN set -x && \
apk add --no-cache -t .deps ca-certificates && \
# Required dependencies.
apk add --no-cache --update npm nodejs-current zlib libgcc && \
# Install docker-compose.
# https://docs.docker.com/compose/install/
DOCKER_COMPOSE_URL=https://github.com$(wget -q -O- https://github.com/docker/compose/releases/latest \
| grep -Eo 'href="[^"]+docker-compose-linux-x86_64' \
| sed 's/^href="//' \
| head -n1) && \
wget -q -O /usr/local/bin/docker-compose $DOCKER_COMPOSE_URL && \
chmod a+rx /usr/local/bin/docker-compose && \
\
# Clean-up
apk del --purge .deps && \
\
# Basic check it works
docker-compose version
RUN npm i -g yarn
COPY run.sh run.sh
RUN chmod +x run.sh
ENTRYPOINT ["./run.sh"]