Skip to content

Instantly share code, notes, and snippets.

@lox
Last active April 15, 2018 11:05
Show Gist options
  • Select an option

  • Save lox/1ae22f46cc2c40ca8714b8e0b959f0a3 to your computer and use it in GitHub Desktop.

Select an option

Save lox/1ae22f46cc2c40ca8714b8e0b959f0a3 to your computer and use it in GitHub Desktop.
Docker and Docker-Compose Example Pipelines
version: "3.2"
services:
app:
build: .
volumes:
- ".:/app"
working_dir: /app
FROM ubuntu:latest
steps:
- name: "Info"
command:
- mount
- pwd
- docker info
- docker volume list
- which docker
- ls -al
- name: "on host"
command: "/bin/sh ./test.sh"
- name: ":docker: docker-compose test"
command: "/bin/sh ./test.sh"
plugins:
docker-compose#v2.0.0:
run: app
- name: ":docker: docker test"
command: "/bin/sh ./test.sh"
plugins:
docker#v1.1.1:
debug: true
image: "ubuntu:latest"
workdir: /app
mount-buildkite-agent: false
#!/bin/sh
echo hello world
@lox
Copy link
Copy Markdown
Author

lox commented Apr 15, 2018

My kubernetes manifest is:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
 name: buildkite-agent
spec:
 replicas: 1
 template:
   metadata:
     labels:
       app: buildkite-agent
   spec:
     containers:
       - name: buildkite-agent
         image: buildkite/agent
         imagePullPolicy: Always
         securityContext:
           privileged: true
         env:
           - name: BUILDKITE_AGENT_TOKEN
             valueFrom: {secretKeyRef: {name: buildkite-agent, key: token}}
           - name: BUILDKITE_AGENT_DEBUG
             value: "true"
           - name: BUILDKITE_BUILD_PATH
             value: "/var/buildkite/builds"
         volumeMounts:
           - name: docker-binary
             mountPath: /usr/bin/docker
           - name: docker-socket
             mountPath: /var/run/docker.sock
           - name: buildkite-builds
             mountPath: /var/buildkite/builds
     volumes:
       - name: docker-binary
         hostPath: {path: /usr/bin/docker}
       - name: docker-socket
         hostPath: {path: /var/run/docker.sock}
       - name: buildkite-builds
         hostPath: {path: /var/buildkite/builds}

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