Skip to content

Commit

Permalink
Updated since documentation tag in preparation for 0.5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC authored and alexbiehl committed Jan 15, 2025
1 parent 0467496 commit cf63245
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

* Add `fromExistingNetwork` to allow connecting containers to existing, unmanaged networks (@alexbiehl, https://github.com/testcontainers/testcontainers-hs/pull/41)

* Add `setMemory` to limit the memory of a Docker container;

* Add `setCpus` to limit the CPUs limit of a docker container;

* Add `fromImageId` to get an `Image` from an image id;

## 0.5.0.0 -- 2023-02-20

* BREAKING: Refined lifecycle management. testcontainers is now using testcontainers/ryuk resource reaper to cleanup containers, networks and volumes. Release keys for containers are deprecated. (@alexbiehl, https://github.com/testcontainers/testcontainers-hs/pull/33)
Expand Down
6 changes: 3 additions & 3 deletions src/TestContainers/Docker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,15 @@ setCmd newCmd req =
-- | Set the memory limit of a Docker container. This is equivalent to
-- invoking @docker run@ with the @--memory@ parameter.
--
-- @since x.x.x.x
-- @since 0.5.1.0
setMemory :: Text -> ContainerRequest -> ContainerRequest
setMemory newMemory req =
req {memory = Just newMemory}

-- | Set the cpus limit of a Docker container. This is equivalent to
-- invoking @docker run@ with the @--cpus@ parameter.
--
-- @since x.x.x.x
-- @since 0.5.1.0
setCpus :: Text -> ContainerRequest -> ContainerRequest
setCpus newCpus req =
req {cpus = Just newCpus}
Expand Down Expand Up @@ -762,7 +762,7 @@ fromTag tag = defaultToImage $ do
-- | Get an `Image` from an image id. This doesn't run @docker pull@ or any other Docker command
-- on construction.
--
-- @since x.x.x.x
-- @since 0.5.1.0
fromImageId :: Text -> ToImage
fromImageId imageId =
defaultToImage $
Expand Down
2 changes: 1 addition & 1 deletion src/TestContainers/Docker/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class WithoutReaper request where
-- | Do not register the docker resource (container, register, etc.) with the resource reaper.
-- Careful, doing this will make your container leak on shutdown if not explicitly stopped.
--
-- @since x.x.x
-- @since 0.5.1.0
withoutReaper :: request -> request

-- | Identifies a network within the Docker runtime. Assigned by @docker network create@
Expand Down

0 comments on commit cf63245

Please sign in to comment.