package io.renren.config;

import io.renren.common.utils.DockerClientUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class DockerConfig {
    //获取dockerUrl
    @Value("${docker.url}")
    private String dockerUrl;
    //获取docker证书路径
    @Value("${docker_ca}")
    private String docker_ca;
    //获取基础路径位置
    @Value("${host-basepath}")
    private String basePath;

    @Bean
    public DockerClientUtils createDockerClient(){
        return new DockerClientUtils(dockerUrl,docker_ca,basePath);
    }
}
