mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove interim env var LCOW_API_PLATFORM_IF_OMITTED
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
7e7f8160fc
commit
c111fec758
2 changed files with 0 additions and 22 deletions
|
@ -7,7 +7,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -71,17 +70,7 @@ func newImageBuildOptions(ctx context.Context, r *http.Request) (*types.ImageBui
|
||||||
options.Target = r.FormValue("target")
|
options.Target = r.FormValue("target")
|
||||||
options.RemoteContext = r.FormValue("remote")
|
options.RemoteContext = r.FormValue("remote")
|
||||||
if versions.GreaterThanOrEqualTo(version, "1.32") {
|
if versions.GreaterThanOrEqualTo(version, "1.32") {
|
||||||
// TODO @jhowardmsft. The following environment variable is an interim
|
|
||||||
// measure to allow the daemon to have a default platform if omitted by
|
|
||||||
// the client. This allows LCOW and WCOW to work with a down-level CLI
|
|
||||||
// for a short period of time, as the CLI changes can't be merged
|
|
||||||
// until after the daemon changes have been merged. Once the CLI is
|
|
||||||
// updated, this can be removed. PR for CLI is currently in
|
|
||||||
// https://github.com/docker/cli/pull/474.
|
|
||||||
apiPlatform := r.FormValue("platform")
|
apiPlatform := r.FormValue("platform")
|
||||||
if system.LCOWSupported() && apiPlatform == "" {
|
|
||||||
apiPlatform = os.Getenv("LCOW_API_PLATFORM_IF_OMITTED")
|
|
||||||
}
|
|
||||||
p := system.ParsePlatform(apiPlatform)
|
p := system.ParsePlatform(apiPlatform)
|
||||||
if err := system.ValidatePlatform(p); err != nil {
|
if err := system.ValidatePlatform(p); err != nil {
|
||||||
return nil, errdefs.InvalidParameter(errors.Errorf("invalid platform: %s", err))
|
return nil, errdefs.InvalidParameter(errors.Errorf("invalid platform: %s", err))
|
||||||
|
|
|
@ -6,7 +6,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -86,17 +85,7 @@ func (s *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrite
|
||||||
|
|
||||||
version := httputils.VersionFromContext(ctx)
|
version := httputils.VersionFromContext(ctx)
|
||||||
if versions.GreaterThanOrEqualTo(version, "1.32") {
|
if versions.GreaterThanOrEqualTo(version, "1.32") {
|
||||||
// TODO @jhowardmsft. The following environment variable is an interim
|
|
||||||
// measure to allow the daemon to have a default platform if omitted by
|
|
||||||
// the client. This allows LCOW and WCOW to work with a down-level CLI
|
|
||||||
// for a short period of time, as the CLI changes can't be merged
|
|
||||||
// until after the daemon changes have been merged. Once the CLI is
|
|
||||||
// updated, this can be removed. PR for CLI is currently in
|
|
||||||
// https://github.com/docker/cli/pull/474.
|
|
||||||
apiPlatform := r.FormValue("platform")
|
apiPlatform := r.FormValue("platform")
|
||||||
if system.LCOWSupported() && apiPlatform == "" {
|
|
||||||
apiPlatform = os.Getenv("LCOW_API_PLATFORM_IF_OMITTED")
|
|
||||||
}
|
|
||||||
platform = system.ParsePlatform(apiPlatform)
|
platform = system.ParsePlatform(apiPlatform)
|
||||||
if err = system.ValidatePlatform(platform); err != nil {
|
if err = system.ValidatePlatform(platform); err != nil {
|
||||||
err = fmt.Errorf("invalid platform: %s", err)
|
err = fmt.Errorf("invalid platform: %s", err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue