blob: 42c1e9af6b21f20b515ff19c0a41bc87751cfd83 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sling.clam.it.support;
import java.time.Duration;
import org.testcontainers.containers.GenericContainer;
public class ClamContainerFactory {
private static final String CLAM_CONTAINER_IMAGE_NAME = "mk0x/docker-clamav:alpine";
public static GenericContainer container = new GenericContainer<>(CLAM_CONTAINER_IMAGE_NAME)
.withExposedPorts(3310)
.withStartupTimeout(Duration.ofMinutes(5));
public static void startContainer() {
if (!container.isRunning()) {
container.start();
}
}
}