mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 17:47:59 -06:00
Prepare for PR
This commit is contained in:
parent
e4822ba4fe
commit
987b1b73f4
@ -18,7 +18,7 @@ Abstract:
|
||||
|
||||
using wsl::windows::service::wsla::WSLAContainer;
|
||||
|
||||
const std::string nerdctlPath = "/usr/bin/nerdctl";
|
||||
constexpr const char* nerdctlPath = "/usr/bin/nerdctl";
|
||||
|
||||
// Constants for required default arguments for "nerdctl run..."
|
||||
static std::vector<std::string> defaultNerdctlRunArgs{//"--pull=never", // TODO: Uncomment once PullImage() is implemented.
|
||||
@ -66,6 +66,8 @@ CATCH_RETURN();
|
||||
|
||||
Microsoft::WRL::ComPtr<WSLAContainer> WSLAContainer::Create(const WSLA_CONTAINER_OPTIONS& containerOptions, WSLAVirtualMachine& parentVM)
|
||||
{
|
||||
// TODO: Switch to nerdctl create, and call nerdctl start in Start().
|
||||
|
||||
bool hasStdin = false;
|
||||
bool hasTty = false;
|
||||
for (size_t i = 0; i < containerOptions.InitProcessOptions.FdsCount; i++)
|
||||
|
||||
@ -44,7 +44,6 @@ public:
|
||||
private:
|
||||
ServiceRunningProcess m_containerProcess;
|
||||
WSLAVirtualMachine* m_parentVM = nullptr;
|
||||
std::string m_id;
|
||||
|
||||
static std::vector<std::string> PrepareNerdctlRunCommand(const WSLA_CONTAINER_OPTIONS& options, std::vector<std::string>&& inputOptions);
|
||||
};
|
||||
|
||||
@ -94,7 +94,6 @@ try
|
||||
THROW_HR_IF(HRESULT_FROM_WIN32(ERROR_INVALID_STATE), !m_virtualMachine);
|
||||
|
||||
// TODO: Log entrance into the function.
|
||||
m_containerId++;
|
||||
auto container = WSLAContainer::Create(*containerOptions, *m_virtualMachine.Get());
|
||||
THROW_IF_FAILED(container.CopyTo(__uuidof(IWSLAContainer), (void**)Container));
|
||||
|
||||
|
||||
@ -58,7 +58,6 @@ private:
|
||||
std::wstring m_displayName;
|
||||
std::mutex m_lock;
|
||||
|
||||
std::atomic_int m_containerId = 1;
|
||||
// TODO: Add container tracking here. Could reuse m_lock for that.
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user