mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-24 16:17:11 +08:00
Minor dockerile/make changes
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
# forcefully make bash the default shell
|
||||
defshell -bash
|
||||
+2
-1
@@ -4,7 +4,7 @@ FROM teleport-buildbox:latest
|
||||
|
||||
# DEBUG=1 is needed for the Web UI to be loaded from static assets instead
|
||||
# of the binary
|
||||
ENV DEBUG=1 GOPATH=/root/go
|
||||
ENV DEBUG=1 GOPATH=/root/go PATH=$PATH:/root/go/src/github.com/gravitational/teleport/build
|
||||
|
||||
# htop is useful for testing terminal resizing
|
||||
RUN apt-get install -y htop screen; \
|
||||
@@ -12,6 +12,7 @@ RUN apt-get install -y htop screen; \
|
||||
|
||||
VOLUME ["/teleport", "/var/lib/teleport"]
|
||||
COPY .bashrc /root/.bashrc
|
||||
COPY .screenrc /root/.screenrc
|
||||
|
||||
# expose only proxy ports (SSH and HTTPS)
|
||||
EXPOSE 3023 3080
|
||||
|
||||
+6
-6
@@ -68,10 +68,10 @@ enter-two:
|
||||
.PHONY:shell
|
||||
shell:
|
||||
docker build -t $(TELEBOX) .
|
||||
docker network create --subnet=172.10.0.0/16 $(NETNAME)
|
||||
docker run --name=teleport-shell --rm=true -ti \
|
||||
--hostname two-node \
|
||||
--ip 172.10.1.4 \
|
||||
--volume $(THISDIR)/data/two/node:/var/lib/teleport \
|
||||
-docker network create --subnet=172.10.0.0/16 $(NETNAME)
|
||||
-docker run --name=one --rm=true -ti \
|
||||
--hostname one \
|
||||
--ip 172.10.1.1 \
|
||||
--volume $(THISDIR)/data/one:/var/lib/teleport \
|
||||
$(DOCKEROPS) $(TELEBOX) /bin/bash
|
||||
-@docker network rm $(NETNAME)
|
||||
-docker network rm $(NETNAME)
|
||||
|
||||
+7
-2
@@ -80,11 +80,16 @@ the YAML file to `tctl` via `-c` flag.
|
||||
Also you can start an empty container from which you can manually invoke `teleport start`.
|
||||
This is similar to launching an empty Linux VM with a Teleport binary.
|
||||
|
||||
Do:
|
||||
To get shell inside the same "one" (single-node cluster) container without
|
||||
Teleport running:
|
||||
|
||||
```bash
|
||||
$ make shell
|
||||
```
|
||||
|
||||
if you get "network already exists" error, do `make stop` first.
|
||||
NOTE: If you get "network already exists" error, do `make stop` first.
|
||||
|
||||
Once inside, you'll get the same `/var/lib/teleport` as "one", so you
|
||||
can start (and even build) `teleport` daemon manually. This container also
|
||||
comes with a fully configured `screen` so you can treat it as a real VM.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user