[FEATURE REQUEST] Painless access from local host to hosts/ports on private network #5754
Labels
type/enhancement
Issues that are improvements for existing features.
type/feature
Issues that are new feature requests.
type/request
Issues that are created by customers.
My use-case: I use RDS (postgres) in one of my environments and need to do backups so I can test schema and data migrations. Ultimately I need these backups on my local host so I can develop the migrations.
What I wish we had was a ssh-like option to exec:
copilot svc exec -L localport:remotehost:remotport
.Lacking that I've created a "bastion" Backend Service which launches a stock postgres image. An abbreviated manifest looks like this:
In particular, note the entrypoint: the image sleeps instead of running the default entrypoint (starting a postgresql server). With the above I can run
copilot svc exec -n bastion
and runpsql
,pg_dump
, etc. Works like a charm. However, any backups end up on the container and it's very painful to get the files off the container.I did stumble on to
run local --proxy
which I thought would solve my problems, i.e., first runcopilot run local -n bastion --proxy
, then in another terminal rundocker exec -it CONTAINER /bin/bash
and runpsql
,pg_dump
there.However, when I run
copilot run local -n bastion --proxy
:docker cp
, what would be much, much better: be able to specifydocker run
options like-v
.#5441 was closed because #5263 (
run local --proxy
) was the suggestedsolution. I still think an explicit port-forwarding solution (via
svc exec
) is a powerful, useful tool that should be reconsidered.I can live with
run local --proxy
but, minimally, need it to honor the manifest'sentrypoint
(andcommand
, too), or offer command-line options to specify. And as noted, it should allow bind-mounting host paths.Thanks!
The text was updated successfully, but these errors were encountered: