### Description

This issue should be resolved by simply adding `ulimits` parameter to `DockerOperator` that is directly passed to [`create_host_config`](https://docker-py.readthedocs.io/en/stable/api.html#docker.api.container.ContainerApiMixin.create_host_config).

### Use case/motivation

Currently applying custom `ulimits` is not possible with `DockerOperator`, making it necessary to do some hacky entrypoint workarounds instead.

By implementing this feature, one should be able to set Ulimits directly by giving a list of [`Ulimit`](https://docker-py.readthedocs.io/en/stable/api.html#docker.types.Ulimit)-instances to `DockerOperator`.


### Related issues

_No response_

### Are you willing to submit a PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

#
#
#
from __future__ import annotations
import logging
from unittest import mock
from unittest.mock import call
import pytest
from docker import APIClient
from docker.errors import APIError
from docker.types import DeviceRequest, LogConfig, Mount
from airflow.exceptions import AirflowException, AirflowSkipException
from airflow.providers.docker.exceptions import DockerContainerFailedException
from airflow.providers.docker.operators.docker import DockerOperator
TEST_CONN_ID = "docker_test_connection"
TEST_DOCKER_URL = "unix://var/run/docker.test.sock"
TEST_API_VERSION = "1.19"  
TEST_IMAGE = "apache/airflow:latest"
TEST_CONTAINER_HOSTNAME = "test.container.host"
TEST_HOST_TEMP_DIRECTORY = "/tmp/host/dir"
TEST_AIRFLOW_TEMP_DIRECTORY = "/tmp/airflow/dir"
TEST_ENTRYPOINT = '["sh", "-c"]'
TEMPDIR_MOCK_RETURN_VALUE = "/mkdtemp"
@pytest.mark.parametrize("docker_conn_id", [pytest.param(None, id="empty-conn-id"), TEST_CONN_ID])