-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# ./.tmuxinator.yml | ||
|
||
name: docker_test | ||
root: ./ | ||
|
||
# Optional tmux socket | ||
# socket_name: foo | ||
|
||
# Note that the pre and post options have been deprecated and will be replaced by | ||
# project hooks. | ||
|
||
# Project hooks | ||
|
||
# Runs on project start, always | ||
# on_project_start: command | ||
|
||
# Run on project start, the first time | ||
# on_project_first_start: command | ||
|
||
# Run on project start, after the first time | ||
# on_project_restart: command | ||
|
||
# Run on project exit ( detaching from tmux session ) | ||
# on_project_exit: command | ||
|
||
# Run on project stop | ||
# on_project_stop: command | ||
|
||
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. | ||
# pre_window: rbenv shell 2.0.0-p247 | ||
|
||
# Pass command line options to tmux. Useful for specifying a different tmux.conf. | ||
# tmux_options: -f ~/.tmux.mac.conf | ||
|
||
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. | ||
# tmux_command: byobu | ||
|
||
# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. | ||
# startup_window: editor | ||
|
||
# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. | ||
# startup_pane: 1 | ||
|
||
# Controls whether the tmux session should be attached to automatically. Defaults to true. | ||
# attach: false | ||
|
||
windows: | ||
- editor: | ||
layout: main-horizontal | ||
# Synchronize all panes of this window, can be enabled before or after the pane commands run. | ||
# 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' | ||
# synchronize: after | ||
panes: | ||
- build: | ||
- pushd ../../07_detect_os | ||
- docker buildx build --progress=plain -f Dockerfile.os -t detect-os . | ||
- docker rm detect-os | ||
- docker run --name detect-os detect-os | ||
- logs: | ||
- lnav docker://detect-os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# TMUXINATOR DOCKER TEST | ||
|
||
Test tmuxinator building and showing logs from a container. | ||
|
||
* Build a docker container | ||
* Run the docker container | ||
* Get logs in the bottom window | ||
|
||
TODO: | ||
|
||
* Build the container, run and get the logs. | ||
* Split the windows in the correct direction. | ||
* Wondering if it's best to mix with just to control what gets run in each pane. | ||
|
||
## Run | ||
|
||
Use the [07_detect_os/README.md](../../07_detect_os/README.md) as an example. | ||
|
||
```sh | ||
cd 50_tmux_and_screen/tmuxinator_docker_test | ||
tmuxinator | ||
|
||
ctrl+b d | ||
|
||
tmux kill-session -t docker_test | ||
``` | ||
|
||
## Creation | ||
|
||
```sh | ||
tmuxinator new --local docker_test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# lists recipes | ||
default: | ||
@just -f docker.justfile --list | ||
|
||
# list docker images | ||
list-images: | ||
docker images | ||
|
||
# build dockerfile.processor | ||
build: | ||
@echo 'Build container' | ||
docker buildx build --progress=plain -f Dockerfile.processor -t processor . | ||
|
||
# run processor | ||
run: | ||
@echo 'Run container' | ||
docker run --rm -it processor | ||
|
||
# logs | ||
logs: | ||
@echo 'Container logs' | ||
lnav docker://detect-os | ||
|
||
|