Add insecure-registries config for Docker daemon
This commit is contained in:
@@ -8,9 +8,6 @@ on:
|
|||||||
env:
|
env:
|
||||||
REGISTRY: 194.5.195.53:30080
|
REGISTRY: 194.5.195.53:30080
|
||||||
IMAGE_NAME: admin/backoffice-bff
|
IMAGE_NAME: admin/backoffice-bff
|
||||||
HTTP_PROXY: http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
|
||||||
HTTPS_PROXY: http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
|
||||||
NO_PROXY: 127.0.0.1,localhost,194.5.195.53,.svc,.cluster.local
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -19,19 +16,30 @@ jobs:
|
|||||||
image: docker:latest
|
image: docker:latest
|
||||||
options: --privileged
|
options: --privileged
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set proxy for apk
|
||||||
|
run: |
|
||||||
|
export http_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||||
|
export https_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||||
|
|
||||||
- name: Install git
|
- name: Install git
|
||||||
run: |
|
run: |
|
||||||
|
export http_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||||
|
export https_proxy=http://proxyuser:87zH26nbqT2@46.249.98.211:3128
|
||||||
apk add --no-cache git
|
apk add --no-cache git
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git config --global http.proxy ""
|
|
||||||
git config --global https.proxy ""
|
|
||||||
git clone --depth 1 --branch kub-stage http://194.5.195.53:30080/admin/BackOffice.BFF.git .
|
git clone --depth 1 --branch kub-stage http://194.5.195.53:30080/admin/BackOffice.BFF.git .
|
||||||
git log -1 --format="%H %s"
|
git log -1 --format="%H %s"
|
||||||
|
|
||||||
- name: Start Docker daemon
|
- name: Start Docker daemon with insecure registry
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p /etc/docker
|
||||||
|
cat > /etc/docker/daemon.json << 'DOCKER_EOF'
|
||||||
|
{
|
||||||
|
"insecure-registries": ["194.5.195.53:30080"]
|
||||||
|
}
|
||||||
|
DOCKER_EOF
|
||||||
dockerd &
|
dockerd &
|
||||||
for i in $(seq 1 30); do
|
for i in $(seq 1 30); do
|
||||||
docker info >/dev/null 2>&1 && break || sleep 2
|
docker info >/dev/null 2>&1 && break || sleep 2
|
||||||
@@ -44,8 +52,8 @@ jobs:
|
|||||||
docker build -f BackOffice.BFF.WebApi/Dockerfile \
|
docker build -f BackOffice.BFF.WebApi/Dockerfile \
|
||||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
||||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
||||||
--build-arg HTTP_PROXY=${{ env.HTTP_PROXY }} \
|
--build-arg HTTP_PROXY=http://proxyuser:87zH26nbqT2@46.249.98.211:3128 \
|
||||||
--build-arg HTTPS_PROXY=${{ env.HTTPS_PROXY }} \
|
--build-arg HTTPS_PROXY=http://proxyuser:87zH26nbqT2@46.249.98.211:3128 \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Push to Registry
|
- name: Push to Registry
|
||||||
|
|||||||
Reference in New Issue
Block a user