(cidPath string)
| 195 | } |
| 196 | |
| 197 | func newCIDFile(cidPath string) (*cidFile, error) { |
| 198 | if cidPath == "" { |
| 199 | return &cidFile{}, nil |
| 200 | } |
| 201 | if _, err := os.Stat(cidPath); err == nil { |
| 202 | return nil, errors.New("container ID file found, make sure the other container isn't running or delete " + cidPath) |
| 203 | } |
| 204 | |
| 205 | f, err := os.Create(cidPath) |
| 206 | if err != nil { |
| 207 | return nil, fmt.Errorf("failed to create the container ID file: %w", err) |
| 208 | } |
| 209 | |
| 210 | return &cidFile{path: cidPath, file: f}, nil |
| 211 | } |
| 212 | |
| 213 | //nolint:gocyclo |
| 214 | func createContainer(ctx context.Context, dockerCLI command.Cli, containerCfg *containerConfig, options *createOptions) (containerID string, _ error) { |
no outgoing calls
searching dependent graphs…