Merged in feature/python-slim (pull request #2)
Feature/python slim Approved-by: Tyler Hodapp <nightfire929@gmail.com>
This commit is contained in:
commit
35b6a4e92d
@ -1,5 +1,6 @@
|
|||||||
FROM python
|
FROM python:3.6.2-slim
|
||||||
RUN pip3 install requests discord.py docker pybooru && \
|
RUN apt-get update && apt-get install -y curl &&\
|
||||||
|
pip3 install requests discord.py docker pybooru && \
|
||||||
curl -Lks get.docker.com | bash
|
curl -Lks get.docker.com | bash
|
||||||
|
|
||||||
ADD dragon-bot.py /
|
ADD dragon-bot.py /
|
||||||
|
@ -10,15 +10,21 @@ options:
|
|||||||
docker: true
|
docker: true
|
||||||
|
|
||||||
pipelines:
|
pipelines:
|
||||||
default:
|
branches:
|
||||||
|
master:
|
||||||
- step:
|
- step:
|
||||||
script: # Modify the commands below to build your repository.
|
script:
|
||||||
# Set $DOCKER_HUB_USERNAME and $DOCKER_HUB_PASSWORD as environment variables in repository settings
|
|
||||||
- export IMAGE_NAME=ldooks/dragon-bot:latest
|
- export IMAGE_NAME=ldooks/dragon-bot:latest
|
||||||
|
|
||||||
# build the Docker image (this will use the Dockerfile in the root of the repo)
|
# build the Docker image (this will use the Dockerfile in the root of the repo)
|
||||||
- docker build -t $IMAGE_NAME .
|
- docker build -t $IMAGE_NAME .
|
||||||
# authenticate with the Docker Hub registry
|
# authenticate with the Docker Hub registry
|
||||||
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||||
# push the new Docker image to the Docker registry
|
# push the new Docker image to the Docker registry
|
||||||
- docker push $IMAGE_NAME
|
- docker push $IMAGE_NAME
|
||||||
|
feature/*:
|
||||||
|
- step:
|
||||||
|
script:
|
||||||
|
# Only build iamges, dont push when we're on a feature branch
|
||||||
|
- export IMAGE_NAME=ldooks/dragon-bot:latest
|
||||||
|
# build the Docker image (this will use the Dockerfile in the root of the repo)
|
||||||
|
- docker build -t $IMAGE_NAME .
|
@ -1,7 +1,7 @@
|
|||||||
# Put the latest version of the dragon-bot.py in the container
|
# Put the latest version of the dragon-bot.py in the container
|
||||||
printf "[-] Rebuilding container with latest code\n"
|
# printf "[-] Rebuilding container with latest code\n"
|
||||||
docker build -t dragon-bot .
|
# docker build -t dragon-bot .
|
||||||
printf "[+] Done\n"
|
# printf "[+] Done\n"
|
||||||
|
|
||||||
# Remove the running container so we cna re-use the container name 'dragon-bot'
|
# Remove the running container so we cna re-use the container name 'dragon-bot'
|
||||||
printf "\n[-] Deleting old dragon-bot container from system\n"
|
printf "\n[-] Deleting old dragon-bot container from system\n"
|
||||||
@ -10,5 +10,5 @@ printf "[+] Done\n"
|
|||||||
|
|
||||||
# Run that shit and mount the docker socket so it can talk to the sky-factory container
|
# Run that shit and mount the docker socket so it can talk to the sky-factory container
|
||||||
printf "\n[-] Starting up latest build of container\n"
|
printf "\n[-] Starting up latest build of container\n"
|
||||||
docker run -d --name dragon-bot -v /var/run/docker.sock:/var/run/docker.sock --restart always dragon-bot
|
docker run -d --name dragon-bot -v /var/run/docker.sock:/var/run/docker.sock --restart always ldooks/dragon-bot
|
||||||
printf "[+] Done\n"
|
printf "[+] Done\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user