commit 0de1d42d4bf707db77caf41364d3c93bb4b26b80 Author: Pavel Dmitriev Date: Thu Aug 17 17:21:31 2023 +0300 Initial commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..638bddf --- /dev/null +++ b/.drone.yml @@ -0,0 +1,24 @@ +kind: pipeline +name: Build image +image_pull_secrets: + - dockerconfig +steps: + - name: Build docker image + image: mxfox.ru/mxfox/docker-dind.buildx:latest + privileged: true + environment: + DOCKER_AUTH: + from_secret: dockerconfig + IMAGE_PREFIX: mxfox.ru/mxfox/ansible + + commands: + - buildx-bgstart.sh + - echo $${DOCKER_AUTH} > ~/.docker/config.json + - | + if [ -n "${DRONE_TAG}" ] + then + export xBuildSuffix=" -t $${IMAGE_PREFIX}:${DRONE_TAG} -t $${IMAGE_PREFIX}:latest --push" + else + export xBuildSuffix=" -t $${IMAGE_PREFIX}:${CI_COMMIT_BRANCH}-${CI_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10} -t $${IMAGE_PREFIX}:${CI_COMMIT_BRANCH} --push" + fi + - docker buildx build --platform linux/amd64,linux/arm64 . $${xBuildSuffix} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9299f44 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +#Download base image ubuntu 20.04 +FROM ubuntu:20.04 + +#Configure tz-data +ENV TZ=Europe/Moscow +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +# Update Ubuntu Software repository +RUN apt-get -qy update +RUN apt install -qy python3 python3-pip software-properties-common git ansible +RUN pip install ansible-lint==4.0.0 + +CMD ["/bin/bash"]