<commit_before>package org.apache.mesos.mini.docker;

import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.CreateContainerCmd;
import com.github.dockerjava.api.model.ExposedPort;
import com.github.dockerjava.api.model.PortBinding;
import org.apache.mesos.mini.container.AbstractContainer;

import java.security.SecureRandom;

public class DockerProxy extends AbstractContainer {

    public static final String PROXY_IMAGE = "paintedfox/tinyproxy";
    public static final String CONTAINER_NAME = "tinyproxy";
    public final int proxyPort;

    public DockerProxy(DockerClient dockerClient, int port) {
        super(dockerClient);
        proxyPort = port;
    }

    @Override
    protected void pullImage() {
        pullImage(PROXY_IMAGE, "1.8.3");
    }

    @Override
    protected CreateContainerCmd dockerCommand() {
        return dockerClient
                .createContainerCmd(PROXY_IMAGE)
                .withName(generateRegistryContainerName())
                .withExposedPorts(ExposedPort.parse("" + proxyPort))
                .withPortBindings(PortBinding.parse("0.0.0.0:" + proxyPort + ":8888"));
    }

    String generateRegistryContainerName() {
        return CONTAINER_NAME + "_" + new SecureRandom().nextInt();
    }

}<commit_msg>#31 Reverted back to latest proxy image.<commit_after>package org.apache.mesos.mini.docker;

import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.CreateContainerCmd;
import com.github.dockerjava.api.model.ExposedPort;
import com.github.dockerjava.api.model.PortBinding;
import org.apache.mesos.mini.container.AbstractContainer;

import java.security.SecureRandom;

public class DockerProxy extends AbstractContainer {

    public static final String PROXY_IMAGE = "paintedfox/tinyproxy";
    public static final String CONTAINER_NAME = "tinyproxy";
    public static final String TAG = "latest";
    public final int proxyPort;

    public DockerProxy(DockerClient dockerClient, int port) {
        super(dockerClient);
        proxyPort = port;
    }

    @Override
    protected void pullImage() {
        pullImage(PROXY_IMAGE, TAG);
    }

    @Override
    protected CreateContainerCmd dockerCommand() {
        return dockerClient
                .createContainerCmd(PROXY_IMAGE + ":" + TAG)
                .withName(generateRegistryContainerName())
                .withExposedPorts(ExposedPort.parse("" + proxyPort))
                .withPortBindings(PortBinding.parse("0.0.0.0:" + proxyPort + ":8888"));
    }

    String generateRegistryContainerName() {
        return CONTAINER_NAME + "_" + new SecureRandom().nextInt();
    }

}
{'fraction_non_alphanumeric': 0.09917664670658682, 'fraction_numerical': 0.007859281437125748, 'mean_word_length': 3.3891625615763545, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3017559', 'n_tokens_mistral': 796, 'n_tokens_neox': 743, 'n_words': 149}