‫Today on the show I've got Marcus use me.
‫You've seen him before if you watch my YouTube Live.
‫He's over there on the left.
‫Marcus who is one of the co-founders of
‫Play with Docker and play with Kubernetes.
‫If you're familiar with that we talk about that too all the time on this show and in my courses and
‫all the workshops that everyone I know in the captain's community you know always use you using play
‫with Docker to share our examples and to show people cool stuff.
‫So thanks again Marcos for having a lot of beers one night.
‫And you and Jonathan figuring out how to make that thing work in a matter of hours.
‫It was pretty great.
‫And so here we are years later it is these standard tool now for playing around with Docker without
‫having to put it on your own machine.
‫So you're going to show us off some of the the new features that the command line for moving around
‫between different environments.
‫So take it away.
‫Yes.
‫Thank you very much Brad.
‫So happy to be here once again in the show.
‫You said like a happy still colorblind community and people like to get involved with their career you
‫know through playing with alcohol either through a play would get you on notice that it's a project
‫that we started with Jonathan like a couple of years ago 2015 if I recall correctly and it's being used
‫like allowed to steal out we we're having like thousands of visits per day and we are still about anything
‫conferences.
‫So the past Dr. Con in San Francisco all the workshops we're using the underlying infrastructure so
‫we are really happy to go to Cuba hoping and fostering you know the community and people who want to
‫learn especially in places where the the connection is not really good like India.
‫Maybe some other countries people find that really interesting cases to run stuff complete with operate
‫either a containers or maybe mind some bitcoins and stuff but.
‫Yeah.
‫Eric you were saying where there is that stable internet is like or any conference that you've ever
‫been to.
‫That is correct.
‫It really helps us a Duggar gone to because we got hundreds and hundred hundreds of people all at the
‫same time using play with Duggar.
‫Yeah I went running a workshop at Dr. Khan and we we were trying to download a dot net container image
‫and it just it was just killing the wife.
‫So someone suggested we play with Walker and of course you know within an instant it was able to pull
‫this of.
‫So yeah yeah they keep promising that the next gen Y Fi is gonna allow multiple connections instead
‫of one person talking at a time it's gonna allow a bunch of different people talking at a time to the
‫same IP so maybe that will be the future because every time we upgrade our Wi-Fi and cellular always
‫like okay no conferences are no longer a problem.
‫And then there's still a problem.
‫So yeah there's something there's always something right.
‫Yeah.
‫So anyways back to the contact switching.
‫So Joel actually made like a good introduction like the way that they're using it for UCB and that plus
‫three elements.
‫So I'm going to share my screen now I'm going to try to explain how that was edited a bit in depth.
‫So let me try to.
‫I think I can share because you already have the screen right.
‫Oh Joe you still sharing stuff.
‫Maybe I'm not sure how that works.
‫I'm drinking my day by the.
‫I'm basing what I just haven't seen.
‫As you know
‫the mighty man area I stopped.
‫Let me see if this lets me share not just great.
‫Yes I have it now.
‫So you should be able to see my screen now can you say to again.
‫Yeah.
‫Okay.
‫So I mean my terminal and the first thing that you're going to see in the new doctor 99 three is the
‫doctor context going on right.
‫So the doctor context come on it it basically allows you to do like little things.
‫So it allows you to create a context export and import context these are very much straightforward.
‫I'm not gonna go into this once.
‫I would like to display the constant add context list all the contacts that would have delayed update
‫and use context.
‫So the first thing that I'm going to do is I'm gonna basically do double context.
‫Let's see what we have in our lab.
‫We know basic Docker installation.
‫So basically you're gonna see that you have one context by default which is the default context.
‫And he basically points through your Unix the main target in the machine in this particular case.
‫It's also it also has like a Q and it is a endpoint because I have a cube configured my computer right.
‫If you don't have a QCT L or anything this will show like empty.
‫But in my particular case I'm using units were for my daily work which by the way I work at a site which
‫is a cloud service as a platform.
‫And I we use units regularly and doctor as well.
‫And as you can see my prompt I have computed my degree is conducted.
‫So that's why it shows you in the community.
‫So if you use your net is Docker context automatically like integrates with that and he will allow you
‫to deploy your Docker while closing your analysis.
‫That is the way that you want it do.
‫So I use that for context so I can do Docker yes it will be using my local demon.
‫But now let's say that I want to connect to another Docker demon right.
‫So the way that we did it the way we did this in the past is plagued by setting the doctor host environment
‫or variable like this.
‫Yeah we could use lag DCP so maybe whatever 2 3 7 6 PDC SSL endpoint point six and then.
‫Yes.
‫All right.
‫This will tell that that it can connect.
‫So we had an update on commands or we had to like have a bunch of different windows open with different
‫environment variables each.
‫And it was always weird to figure out which one you were on and yeah is it right.
‫But yeah that could be could be I'd work for it but it could be better.
‫I mean especially now that unity allows like easy contact switching like if I do for example queue CDL
‫CAD config get context you can see that I have a bunch of contexts in my computer so I can like can
‫see we have several regions in my company so I can actually go ahead and switch it to any context and
‫basically run it any commander.
‫So it would be nice to do the same thing with operator.
‫So with the double context command I can actually do that now.
‫So what I'm gonna do now is I'm going to go to play with Docker and I'm gonna create an instance where
‫hopefully this site works.
‫It doesn't matter if you don't see it in the browser because I'm just creating a play with a terminal
‫here and I'm just going to copy the euro of the session of that daemon basically.
‫So this is the crossover associates you are all right.
‫So if you're on play with Docker you see that little SSD you are all in the interface.
‫Yes that's correct.
‫So this is the little.
‫Let me try to add some something today so this is the easiest you know but I'm just gonna copy the whole
‫thing here.
‫I don't mind the to the stage come at some I copy the these is commands.
‫So what what I should be able to do here is I can set up Dr. Holst equals DCP right like the traditional
‫way to reason and try and I should be able to do.
‫Dr. Pearce right.
‫So here as you can see I did it on purpose but pointing my local slide to the play with a demon.
‫So if I do for example the Garan I'm going to just run and X and expose it full support these container
‫is gonna be running on my plate with operations.
‫So if I go to my break ground you can see that the board got its pulse here because I'm pointing to
‫the local level and of course I'm going to be able to access the Internet service and I suppose that
‫easy would play with her anyways.
‫What about if I don't remember the IP or as you said Brad if I have like multiple context or multiple
‫sessions and I need to start playing with this like a better right.
‫Like you know in a different way.
‫So what I'm gonna do is I'm going to copy this URL and I'm gonna use the new double context command
‫to actually say this context into my local limit.
‫So I'm going to do double context create and we're going to see a little bit what the options here are.
‫So basically you can contribute a context for both Docker and points and QNX has a points as I showed
‫earlier.
‫So whenever you set a great point you can either like configure the code name which is the one that
‫we're going to use now you can copy the context information from another context and that's something
‫that I also want to show.
‫And of course you can set up their certificates because if you want to talk to her like and this is
‫a live on.
‫You need to specify the certificates as well and you have an additional option to keep their verification
‫in case you don't have like trust and certificates.
‫Same applies for communities you can either import the humanities option from a different context you
‫can use a Q config file where all the certs are there and then you can override the curious context
‫and the communities namespace because whenever you set up a context you need to tell the doctor context
‫OK and let's talk to this community same point but I'm going to talk to these specific communities context
‫and curate its namespace writing code.
‫And here are some examples of how to do it.
‫Are you following tapas.
‫Yeah nice.
‫So now we're going to create a context like a symbol that would conflict.
‫So I'm going to do Docker context create and I'm going to basically set up a local context and for this
‫I'm going to say and I'm going to use the host and I'm going to just paste did I correct.
‫No I didn't.
‫I'm gonna paste the link with upper end point which I'm going to copy now.
‫So let me try to see the context and then clear this double context create Docker prompt a host.
‫I'm gonna paint this and I'm going to name this context because in this context is gonna be called Play
‫with opera as you can see Dublin content says that it created the context.
‫So if I do local context the less now I should be able to see the default context on the play with ochre
‫1.
‫So now what I can do is like a little dog and context use to switch by context and I can say OK I'm
‫going to use the play with uncut context now and I can do.
‫Dr. Yes and I should be able to see the engine container running which is running here in LA with obviously
‫sport.
‫So if I do Docker let's say our M F this container which is running on with ochre you're going to see
‫that the container got killed.
‫So I do Dr. Pearce here.
‫I don't see anything running saved.
‫So this is how easy you can actually connect to a different context and manipulate your containers running
‫there with a double context command like in a two or three steps the three steps is super easy.
‫Yeah.
‫Is that is that in the background actually changing the environment variable for Doctor host or is it
‫just now that the command line is always looking at that those config files to see which one's current.
‫Good question Fred.
‫So how all this works.
‫So like this the same thing has everything.
‫Everything else works in Docker.
‫What this does under the underneath his like it goes through your Docker like a computation folder and
‫it will create a new follow that is called contexts in this particular folder you have a made up folder
‫where you have like a hash of the context that you created in this in this particular path they're going
‫to see and made other Jason File and this Jason file actually has all the information required for the
‫Daemon to connect.
‫So whenever you specify context what what this is doing underneath is like reading that file getting
‫the whole name of the of this file and then sending this whole thing through the local CLIA So it connects
‫to the remote daemon basically.
‫So it's not set it's sitting a like a variable but it's just reading this file and injecting them in
‫the underlined obviously scale basically yeah it's cool does it does.
‫I mean it is a random question now I've got a bunch of thoughts here is that if you if you end up setting
‫the doctor host does that win.
‫Is there a zero I can fight against each other what was the question sorry.
‫Oh well I'm just thinking like it because you previously you said a darker host environment variables
‫so if that's already set does it win over context or that's a good question.
‫I said it would win but we could slide out so let's say local context alas doesn't context.
‫So I mean the play with overall context let's try to override this.
‫Let's try to use for example my local machine uniques.
‫Is three or four right.
‫Wow.
‫And I was gonna say even if it was wrong you'd know think is it would give you an error just right away
‫it would say yeah that's right.
‫Right well we can do it.
‫OK.
‫Yes.
‫That's a.
‫And yes he'd overwrite the count.
‫Yeah.
‫Okay yeah.
‫So it's kind of like it gets the nice thing here is a basically it's not going to break.
‫Like if you have an existing workflows that are depending on an environment variable it won't break
‫them.
‫It'll only work I guess when that one's either empty or are not set or something.
‫Is there a way to use context in like we do with Cube control where we can specified in the command
‫line or do we have to set it first and then like for example.
‫No there is.
‫So I can actually there's a doctor I see.
‫So you can go doctor just see default.
‫Yes.
‫For example and this will talk to my is it context maybe the her context default X I'm sorry.
‫I think it's def just context and then yeah but just content.
‫Default.
‫Yes.
‫Yeah.
‫That is the idea.
‫Yeah.
‫I think it's actually as well.
‫Yeah.
‫Yeah okay.
‫So you could actually default on the commands.
‫So expect yes or whatever.
‫And this basically overrides the the context that you're upset by by default.
‫Yeah.
‫That's really that's handy.
‫So you're using both of them integrate this because actually because let's say that you want to run
‫a container in the context that you have because you want to sound like a troubleshooting shop job or
‫whatever like brand something you can do for C E and alter context unless let's ask you the same the
‫same thing.
‫Yes.
‫Do for example and then you can do Docker.
‫That's the context.
‫Yes for example.
‫Yeah.
‫So this is basically yeah.
‫If you run these it's gonna like loop through all your contacts and run a command through your although
‫all your policy lies basically.
‫Yeah.
‫That's.
‫Which is which is we go say so I had the up in both of my containers so I can do.
‫Iran hello world and this will run hello world in my machine and he will ruddy also play with.
‫Yeah.
‫So that's a protip for those of you that haven't heard it on either the show or wherever we as we talk
‫about we talk about command stuff that in any of the darker.
‫Well not all of them but a lot of the darker commands a dash Q for quiet actually allows you to do these
‫really nice little one liner bash scripts and stuff because it really pumps out just the ideas or the
‫thing you need in order to talk to them.
‫So it's great that I would have never thought of using it with context.
‫That's a really cool cool scenario or you know and you get into those obviously.
‫So yeah.
‫It's the name of the company.
‫So I can just easily look through that and then run something in parallel through all the glasses that
‫I have which is pretty cool.
‫The last thing that I would like to show you is one and one another thing which is pretty recent in
‫dogma is that you can actually ask a question for you or for the audience that you might know already
‫so which is like they're the best way to connect to remote agreement securely.
‫Well previously it was TCB right.
‫Soupy would tell us.
‫But right that there's a nucleus there's a new player.
‫That's a new thing that's a new thing which landed on 18 or nine and now it has been like enhanced by
‫the 19 or three which is SS age basically connection remote connection threads through the ceiling.
‫So how does that work.
‫So pretty much everyone here like before actually installing doc in the world need to provision a machine
‫right so you need to launch a machine in any cloud or whatever and then you need to a cessation to a
‫machine to do some stuff.
‫So in this particular case I already have a machine running in the cloud so I'm going to search through
‫it by using my God and stage config file.
‫Right.
‫So for those who don't know that I know what this file is basically in your in pretty much every configuration
‫you have a config file that basically lists all the machines that you have in remotely.
‫So this is a public IP and this is the key that I'm using to access a machine.
‫So by having this I can easily access that machine by using a stage it only as laughs last jump jump.
‫So basically SSA will read that computation file and it will just connect with that machine right directly
‫by using all the parameters that I have there the public IP the keys and everything.
‫So one nice thing nice thing that dollhouse and it's specifically done with context is that I can say
‫the context create and I'm going to name this context as a sage.
‫And when it created a context again and what we can do here is in host we can actually use MSHA and
‫we can use the name of the config calls that I have in my files so I can do it all yes.
‫Love last jump here.
‫Right.
‫And that's pretty much it.
‫So now I can switch tracks to that context double context use at this age and I can do it again.
‫Yes let's do the Koran work here.
‫Table
‫so what this is doing this is connecting.
‫I'm not sure what's happening here.
‫So this is connecting through the remote or to the remote agreement through its message not through
‫till s and it is running the container there.
‫So I don't need to like either expose Docker ports to the world.
‫I don't need to set up any such certificates or any CAC or whatever this is just using like plane as
‫I said connection made the way that I usually go to that servers.
‫So now that I mean the server here and the pain in the bottom I can do the previous touch a and you
‫can see that they're in a world container just run there which is pretty pretty amazing because I don't
‫need to do any extra steps or whatever anymore.
‫One last comment about this is that you can actually do it without like you can actually use it today
‫if you don't have like 19 0 0 3 by setting up the doctor host to at stage you're going to either use
‫a name that I or that I use here or you can use like user add IP for example right.
‫Yes I can.
‫I can do the same here.
‫Same here.
‫You just need to make sure that the keys you're using it this way you just need to make sure that the
‫keys that this user has are already in your situation because otherwise you will not know which keys
‫to use basically connectivity simply.
‫Yeah.
‫If I remember correctly this method doesn't work yet.
‫If you are using password based SSA which none of you should be but that's still true.
‫I don't think they've changed that.
‫Yes that's correct.
‫This would only work if you're using like a key based access right.
‫Which which we should all be using.
‫I mean you can obviously use password to get a key into the accepted keys list but this is really cool.
‫And when it first came out last fall I would just shut up about it like I was telling everybody like
‫it was.
‫It was the solution to all problems.
‫And so many people I think are basically to me what the SSA ability in context just makes it even easier
‫to use because basically we can now I can never remember what's in my SSA config file right.
‫There's so much stuff in your associates config it's like yeah I can never remember all the things in
‫there.
‫So having it in the context list means I don't have to leave my Docker command line remember okay what
‫was the name of that server that I called it in essence H.
‫But to me what this is going to do is this this is really gonna help us prevent Docker from people from
‫inadvertently exposing unsecure CCP connections or insecurities to be connections on their knock engines
‫because that does get a little bit of heat.
‫Right.
‫Like we we we have had people that there have been reports that Docker is exposed on the Internet or
‫company is exposed on the Internet.
‫And I think that a lot of that has to do with you know people basically doing this like they need a
‫remote to a server.
‫They don't want SSA.
‫So they do that CCP way and now you know as of eight months ago really we don't need that anymore we
‫have this SSA ability and the context makes it even easier.
‫So I'm sorry I switch away from your screens screen share where you done there just one last thing that
‫I want I'll show you.
‫Let's say that you want to create a context for and it is but you still want to use like your regular
‫doctor stuff like your regular doctor context.
‫You can just use one plug from local content create which is this is taking so long because my local
‫see lights blinking to my SSA chair right out here in remote Serbia.
‫Yeah.
‫One one nice feature that I had that I would like to see is that there's a blog for example for communities
‫that brings the context that you're using it would be nice if we can have like a doctor prompt also.
‫So it tells you in which double contacts you are.
‫So eventually is there was there a way to return current context and then.
‫Yeah.
‫You do take into context the less this will tell you the quantitative easing has to start here.
‫So I don't know if there's a way to tell.
‫Give me the current context because of it.
‫If you did I was just thinking this I was actually thinking it would be called this out a one liner
‫on how to add here bashers this age profile.
‫Yeah.
‫Very very content in there.
‫But it is still a nose.
‫There should be a way to know which content seriously.
‫Yeah.
‫We need to we need to see how this CIA actually doesn't like the current bird.
‫Yeah yeah.
‫Because security is has.
‫But I don't know if you can do it without or maybe Jonas.
‫It's a good idea.
‫I like this and I'm curious if there is a way to filter.
‫I mean you can grill but nice.
‫So joyously looking at look it up for us.
‫In any case is going to say it would be cool yeah if we had like just a separate command that we could
‫pipe and we could throw into a there that would just return the name instead of a second extra late.
‫Yeah yeah.
‫So the way that I want to get the LSD.
‫Well else that you might give you go all of them.
‫Yeah I would give you all of them.
‫Oh so I just saying.
‫So do a dash Q And then a filter on maybe there's a filter on current.
‫I think you do have a filter here.
‫Yeah yeah.
‫Just format anyways.
‫Yeah.
‫OK.
‫So what I wanted to show is let's say that you want to create a new context.
‫They occur let's say context create and then I'm going to set up like Unity's units just like config
‫file or something.
‫There is a com videos create I don't do this regularly a lot.
‫So you can say community sampling here and then you can say copy failure so you can.
‫Let's say that I want to use curious config file some file some file and then I will reuse the docker
‫context or I'm using my default contacts for example because I don't want to like set up the whole scanning.
‫So what I can do is I can set up like Dr. Douglas Tucker and I can tell this guy from default.
‫And this default is like another contact that I have.
‫And I need to specify it which I didn't do.
‫It's not Cuba.
‫That is I was at the same table and let's create like a desk.
‫So what this is going to do it is gone.
‫This is going to create a new context.
‫But you'll find part doesn't matter.
‫This is going to create a new context but it's going to reuse their doctor information that I have in
‫my default context I can remove the current part just to try and works
‫and this basically context was created.
‫So if I if I do Doctor context use test and I do Dr. Pierce this will talk to my local Lima because
‫I contribute to local context use the same context on the people context basically which is my local
‫machine.
‫That's also a pretty neat addition that you can like easily alias that either the doctor curate its
‫context from a different animal control that you have in your machine.
‫Yeah so that's pretty much what I want to know today.
‫Like lots of interesting tooling around like fiddling with democracy like when you set the darker context
‫is that also set the context for cube control is a totally separate No.
‫That's a totally separate thing.
‫OK that would be cool if that was an option to have the doctor set the cube control for you.
‫So you had a one liner for everything.
‫Because usually when you change Doctor contacts you usually want both to be talking that same server
‫like a a dash a dash K which also includes the context change for Cuba.
‫Maybe that's a good idea.
‫I've already got a thousand features we need to add to this and it just it just showed up.
‫But you know we we need we need version to now biodegrade and by the way.
‫I have the answer to the questions got in the current context that he selected.
‫Yeah.
‫So if you go to yet your config that general updates on file which I'm not going to stop because it
‫has my keys.
‫There's a value in that Jason which says current context I never wanted to name that the context so
‫there's a way to know.
‫Yeah so there's a config so for those you don't know.
‫Actually I can show Monroe quick.
‫So people.
‫Yeah.
‫Let me I can I can show my comment by my my the caller ID like.
‫Okay I got it I got yeah because mine is using the Mac Store so it doesn't have to have the key in there
‫yeah.
‫So yeah basically if you're not familiar your command line on any Docker command line has a config file
‫that controls how your your command line is working or.
‫Yeah.
‫And so there's cool things that have been added lossless that's actually been added in the last year
‫to this because you now can define when you're doing Docker like Ducker stack commands.
‫You can actually deploy those stacks now to Cuba.
‫So there is such a thing as a stack default stack orchestrator so you can you can say I want Cuban entities
‫when I do a darker stack deploy to actually talk to Cuba.
‫Nettie so that's a pretty cool thing most people don't know about that but yeah.
‫One of the things here would be a default context which I don't have one set because I just installed
‫the brand new 1983 release and it wiped out my config because I had an old beta.
‫So yeah that would normally that would be stored in there.
‫And yeah yeah there's a lot of Gothic ski there that has the name of the complex Yeah.
‫If it's apps and I think it's because it's using the default you are some simple script and you'd probably
‫get the current context is we but that's a I'm sure that someone that's watching live or in the next
‫20 minutes on Twitter will give us a one liner that uses JQ with pulling out this Jason File and finding
‫the default context and putting it in every shell command so make it happen Internet.
‫Well thank you so much gentlemen for joining the call today.