Add docker:dind image that include docker and added privileges to run docker
This commit is contained in:
parent
12a0db8015
commit
36c6951684
1 changed files with 22 additions and 2 deletions
|
|
@ -1,11 +1,31 @@
|
||||||
|
# pipeline:
|
||||||
|
# build_and_deploy:
|
||||||
|
# image: bash
|
||||||
|
# commands:
|
||||||
|
# - docker build -t frontend:${CI_COMMIT_SHA:0:8} .
|
||||||
|
# - docker tag frontend:${CI_COMMIT_SHA:0:8} frontend:latest
|
||||||
|
# - docker stop frontend || true
|
||||||
|
# - docker rm frontend || true
|
||||||
|
# - docker run -d --name frontend -p 5173:5173 frontend:latest
|
||||||
|
|
||||||
|
# branches: master
|
||||||
|
|
||||||
|
clone:
|
||||||
|
git:
|
||||||
|
image: woodpeckerci/plugin-git
|
||||||
|
settings:
|
||||||
|
depth: 1
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
build_and_deploy:
|
build_and_deploy:
|
||||||
image: bash
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
commands:
|
commands:
|
||||||
|
- sleep 5 # Give Docker daemon time to start
|
||||||
- docker build -t frontend:${CI_COMMIT_SHA:0:8} .
|
- docker build -t frontend:${CI_COMMIT_SHA:0:8} .
|
||||||
- docker tag frontend:${CI_COMMIT_SHA:0:8} frontend:latest
|
- docker tag frontend:${CI_COMMIT_SHA:0:8} frontend:latest
|
||||||
- docker stop frontend || true
|
- docker stop frontend || true
|
||||||
- docker rm frontend || true
|
- docker rm frontend || true
|
||||||
- docker run -d --name frontend -p 5173:5173 frontend:latest
|
- docker run -d --name frontend -p 5137:5137 frontend:latest
|
||||||
|
|
||||||
branches: master
|
branches: master
|
||||||
Loading…
Add table
Add a link
Reference in a new issue