Docker centOS 7 based with systemd enabled and sshd installed.
docker build --rm -t c7-systemd-sshd .
docker run --rm --privileged=true -p 22:22 -v /sys/fs/cgroup:/sys/fs/cgroup:ro c7-systemd-sshd
Alternatively you can use docker compose
#!/bin/bash | |
cd $1 | |
git checkout master | |
git fetch --prune | |
OLD_BRANCHES=$(git branch -v | grep gone | cut -d " " -f3) | |
for branch in ${OLD_BRANCHES}; do | |
git branch -D ${branch} | |
done |
- hosts: host-list | |
sudo: yes | |
tasks: | |
- name: "Installing Docker Prerequisite packages" | |
yum: | |
name: "{{ item }}" | |
state: latest | |
with_items: | |
- yum-utils | |
- device-mapper-persistent-data |
- hosts: host-list | |
sudo: yes | |
tasks: | |
- name: "Add epel-release repo" | |
yum: | |
name: epel-release | |
state: present | |
- name: "Install nginx" | |
yum: | |
name: nginx |
- hosts: host-list | |
sudo: yes | |
tasks: | |
- name: "Install pip" | |
easy_install: | |
name: pip | |
- name: "Install docker-py" | |
pip: | |
name: docker-py | |
- name: "Create nexus-data dir and make it writable by the Nexus process, which runs as UID 200" |
server { | |
listen *:80; | |
server_name my.nexus.url; | |
# and redirect to the non-www host (declared below) | |
return 301 https://my.nexus.url$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name my.nexus.url; |
Repositório de artefatos Nexus Repository Manager 3.
A instalação é feita utilizando a imagem docker oficial do nexus. Guias e documentações:
#!/bin/bash | |
# WARNING! This script deletes data! | |
# Purge old images retaining configured amount of tags. Tag latest will be always preserved. | |
REGISTRY=your_registry | |
REPOSITORY=your_repository | |
HISTORY_SIZE=amount_of_tags_to_be_remain | |
az acr repository show-tags -n $REGISTRY --repository $REPOSITORY --orderby time_desc --query "[?@ != 'latest'] | [$HISTORY_SIZE:]" -o tsv \ |
#!/bin/bash | |
# WARNING! This script deletes data! | |
# Purge untagged (orphaned) images | |
REGISTRY=your_registry | |
REPOSITORY=your_repository | |
az acr repository show-manifests --name $REGISTRY --repository $REPOSITORY --query "[?tags[0]==null].digest" -o tsv \ | |
| xargs --replace=digest --verbose az acr repository delete -n $REGISTRY --image $REPOSITORY@digest --yes |