Tasks to Gulp with Docker. This is to Tasks easy work in Develop and Ops of project.
Actions List:
- build
gulp build
- deploy
gulp deploy
- terminate
gulp terminate
- start
gulp start
- stop
gulp stop
- redeploy
gulp redeploy
- rebuild
gulp rebuild
- logs
gulp logs
'NPM' is used for installing this component.
npm install --save gulp-docker-tasks
Initialize all tasks using the .attach ()
.
var gulp = require("gulp");
var Docker = require("gulp-docker-tasks");
var docker = new Docker();
docker.attach();
Initializes all methods. for gulp command.
gulp.task("myLogs", function (done) {
docker.attach(done);
});
It is equivalent to using docker build
. Build an image from a Dockerfile.
gulp.task("myLogs", function (done) {
docker.build(done);
});
It is equivalent to using docker run
. Run a command in a new container.
gulp.task("myLogs", function (done) {
docker.deploy(done);
});
It is equivalent to using docker rm -f
. Remove one or more containers.
gulp.task("myLogs", function (done) {
docker.terminate(done);
});
It is equivalent to using docker start
. Start one or more stopped containers.
gulp.task("myLogs", function (done) {
docker.start(done);
});
It is equivalent to using docker stop
. Stop a running container.
gulp.task("myLogs", function (done) {
docker.stop(done);
});
It is equivalent to using docker rm -f
and docker run
.
gulp.task("myLogs", function (done) {
docker.redeploy(done);
});
It is equivalent to using docker build
.
gulp.task("myLogs", function (done) {
docker.build(done);
});
It is equivalent to using docker logs
. Fetch the logs of a container.
gulp.task("myLogs", function (done) {
docker.logs(done);
});