File: //snap/google-cloud-cli/396/help/man/man1/gcloud_beta_code_dev.1
.TH "GCLOUD_BETA_CODE_DEV" 1
.SH "NAME"
.HP
gcloud beta code dev \- run a Cloud Run service in a local development environment
.SH "SYNOPSIS"
.HP
\f5gcloud beta code dev\fR [\fISERVICE_CONFIG\fR] [\fB\-\-[no\-]allow\-secret\-manager\fR] [\fB\-\-local\-port\fR=\fILOCAL_PORT\fR] [\fB\-\-secrets\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-source\fR=\fISOURCE\fR] [\fB\-\-no\-stop\-cluster\fR] [\fB\-\-application\-default\-credential\fR\ |\ \fB\-\-service\-account\fR=\fISERVICE_ACCOUNT\fR] [\fB\-\-builder\fR=\fIBUILDER\fR\ |\ \fB\-\-dockerfile\fR=\fIDOCKERFILE\fR;\ default="Dockerfile"] [\fB\-\-kube\-context\fR=\fIKUBE_CONTEXT\fR\ |\ \fB\-\-minikube\-profile\fR=\fIMINIKUBE_PROFILE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR Run a Cloud Run service in a local development environment.
This command takes Cloud Run source, builds it, and runs it on the local
machine. This command also watches the relevant source files and updates the
container when they change.
.SH "EXAMPLES"
If building images using a Dockerfile:
.RS 2m
$ gcloud beta code dev \-\-dockerfile=<path_to_dockerfile>
.RE
If the Dockerfile is named \f5Dockerfile\fR and is located in the current
directory, the \f5\-\-dockerfile\fR flag may be omitted:
.RS 2m
$ gcloud beta code dev
.RE
To access Google Cloud Platform services with the current user's credentials,
login to obtain the application default credentials and invoke this command with
the \f5\-\-application\-default\-credential\fR flag.
.RS 2m
$ gcloud auth application\-default login
$ gcloud beta code dev \-\-dockerfile=<path_to_dockerfile> \e
\-\-application\-default\-credential
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
[\fISERVICE_CONFIG\fR]
service.yaml filename override. Defaults to the first file matching
\f5*service.dev.yaml\fR then \f5*service.yaml\fR, if any exist. This path is
relative to the \-\-source dir.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-[no\-]allow\-secret\-manager\fR
Suppress warnings if secrets need to be pulled from secret manager. Use
\fB\-\-allow\-secret\-manager\fR to enable and
\fB\-\-no\-allow\-secret\-manager\fR to disable.
.TP 2m
\fB\-\-local\-port\fR=\fILOCAL_PORT\fR
Local port to which the service connection is forwarded. If this flag is not
set, then a random port is chosen.
.TP 2m
\fB\-\-secrets\fR=[\fIKEY\fR=\fIVALUE\fR,...]
List of key\-value pairs to set as secrets.
.TP 2m
\fB\-\-source\fR=\fISOURCE\fR
The directory containing the source to build. If not specified, the current
directory is used.
.TP 2m
\fB\-\-stop\-cluster\fR
If running on minikube, stop the minkube profile at the end of the session.
Enabled by default, use \fB\-\-no\-stop\-cluster\fR to disable.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-application\-default\-credential\fR
When connecting to Google Cloud Platform services, use the application default
credential.
.TP 2m
\fB\-\-service\-account\fR=\fISERVICE_ACCOUNT\fR
When connecting to Google Cloud Platform services, use a service account key.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-builder\fR=\fIBUILDER\fR
Build with a given Cloud Native Computing Foundation Buildpack builder.
.TP 2m
\fB\-\-dockerfile\fR=\fIDOCKERFILE\fR; default="Dockerfile"
Dockerfile for the service image.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-kube\-context\fR=\fIKUBE_CONTEXT\fR
Kubernetes context.
.TP 2m
\fB\-\-minikube\-profile\fR=\fIMINIKUBE_PROFILE\fR
Minikube profile.
.RE
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.
Run \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in beta and might change without notice. This variant
is also available:
.RS 2m
$ gcloud alpha code dev
.RE