-
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
44 changed files
with
114 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,3 @@ | ||
# Docker | ||
|
||
This folder contains Docker sessions. | ||
|
||
## User-usable sessions | ||
|
||
* [custom_package](./custom_package) builds a custom ROS package into a Docker image | ||
* [local_docker_registry](./local_docker_registry) starts a local docker registry on a personal machine | ||
* [uav_session](./uav_session) sessions supposed to be started by the user via the Portainer system | ||
* | ||
|
||
## Admin and initial setup sessions | ||
|
||
* [portainer](./portainer) starts the Portainer-CE system (initial setup only) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
docker/custom_package/.gitignore → docker/user_workspace/.gitignore
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
cache | ||
*.tar | ||
*.tar.gz |
File renamed without changes.
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,53 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG | ||
trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR | ||
|
||
# get the path to this script | ||
MY_PATH=`dirname "$0"` | ||
MY_PATH=`( cd "$MY_PATH" && pwd )` | ||
|
||
cd ${MY_PATH} | ||
|
||
## -------------------------------------------------------------- | ||
## | setup | | ||
## -------------------------------------------------------------- | ||
|
||
LOCAL_TAG=user_workspace:1.0.0 | ||
|
||
ARCH=arm64 # robofly | ||
# ARCH=amd64 | ||
|
||
source ./paths.sh | ||
|
||
## -------------------------------------------------------------- | ||
## | build | | ||
## -------------------------------------------------------------- | ||
|
||
# initialize the cache | ||
[ ! -e ${CACHE_PATH}/${WORKSPACE_PATH} ] && mkdir -p ./${CACHE_PATH}/${WORKSPACE_PATH} | ||
|
||
PASS_TO_DOCKER_BUILD="Dockerfile src ${CACHE_PATH}/${WORKSPACE_PATH}" | ||
|
||
docker buildx use default | ||
|
||
echo "" | ||
echo "$0: building the user's workspace" | ||
echo "" | ||
|
||
# this first build compiles the contents of "src" and storest the intermediate | ||
tar -czh $PASS_TO_DOCKER_BUILD 2>/dev/null | docker build - --no-cache --target stage_cache_workspace --output ./${CACHE_PATH} --build-arg WORKSPACE_PATH=${WORKSPACE_PATH} --file Dockerfile --platform=linux/$ARCH | ||
|
||
echo "" | ||
echo "$0: packing the workspace into a docker image" | ||
echo "" | ||
|
||
# this second build takes the resulting workspace and storest in in a final image | ||
# that can be deployed to a drone | ||
docker build . --no-cache --target stage_finalization --file Dockerfile --build-arg WORKSPACE_PATH=${WORKSPACE_PATH} --tag $LOCAL_TAG --platform=linux/$ARCH | ||
|
||
echo "" | ||
echo "$0: workspace was packed into '$LOCAL_TAG'" | ||
echo "" |
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,28 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG | ||
trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR | ||
|
||
# get the path to this script | ||
MY_PATH=`dirname "$0"` | ||
MY_PATH=`( cd "$MY_PATH" && pwd )` | ||
|
||
cd ${MY_PATH} | ||
|
||
## -------------------------------------------------------------- | ||
## | setup | | ||
## -------------------------------------------------------------- | ||
|
||
source ./paths.sh | ||
|
||
## -------------------------------------------------------------- | ||
## | build | | ||
## -------------------------------------------------------------- | ||
|
||
rm -rf $CACHE_PATH | ||
|
||
echo "" | ||
echo "$0: cache cleaned" | ||
echo "" |
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,29 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG | ||
trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR | ||
|
||
# get the path to this script | ||
MY_PATH=`dirname "$0"` | ||
MY_PATH=`( cd "$MY_PATH" && pwd )` | ||
|
||
cd ${MY_PATH} | ||
|
||
## -------------------------------------------------------------- | ||
## | setup | | ||
## -------------------------------------------------------------- | ||
|
||
LOCAL_TAG=user_workspace:1.0.0 | ||
|
||
## -------------------------------------------------------------- | ||
## | export | | ||
## -------------------------------------------------------------- | ||
|
||
docker save $LOCAL_TAG | gzip > ${LOCAL_TAG}.tar.gz | ||
|
||
echo "" | ||
echo "$0: image exorted as ${LOCAL_TAG}.tar.gz" | ||
echo "" | ||
|
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,3 @@ | ||
export WORKSPACE_PATH=etc/catkin_workspace | ||
export CACHE_PATH=cache | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.