Skip to content

Instantly share code, notes, and snippets.

@baydakovss
baydakovss / gist:a95dd608f5ab6d5659b3cfb870032652
Created June 15, 2023 10:18
Docker on WSL2 does not bind mount local folder to container on docker machine (virtualbox)
# Problem
# Mounting folders outside the users folder on windows is not working
cd ~/sources/../
docker run --rm -it -v .:/mnt alpine ls -1 /mnt
empty
# Workaround:
Since Docker Machine mounts Windows user folder we will deceive it.
# Windows
Move source folder to c:/Users/username/
@baydakovss
baydakovss / gist:bf9374d4983e17fa79469d8c5b958771
Last active June 17, 2023 17:31
Invalid mount path: mount path must be absolute error (gitbash and docker-machine)
docker run --name registry -p 5000:5000 --mount "type=bind,source=$PWD,target=/var/lib/registry" registry
docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'C:/Users/user/sources' mount path must be absolute
# right way
export MSYS_NO_PATHCONV=1
# workaround - double //
source=//c//Users//user//sources//project
@baydakovss
baydakovss / gist:0944441b547233f9b641cc604c3a28d7
Last active June 17, 2023 14:31
How to list docker swarm nodes with labels
docker node ls -q | xargs docker node inspect -f '{{ .ID }} [{{ .Description.Hostname }}]: {{ .Spec.Labels }}'
docker node inspect --pretty swarm
ID: xa56lddvm1la1i8f444zw4mop
Labels:
- env=prod

Frontend Masters: AWS for Frontend Engineers

You should have the following completed on your computer before the workshop:

  • Install the AWS CLI.
  • Have Node.js installed on your system. (Recommended: Use nvm.)
    • Install yarn with brew install yarn.
  • Create an AWS account. (This will require a valid credit card.)
  • Create a Travis CI account. (This should be as simple as logging in via GitHub).
@baydakovss
baydakovss / list.txt
Created October 10, 2023 17:04 — forked from shortjared/list.txt
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@baydakovss
baydakovss / docker_compose_assume_iam_role.sh
Created January 25, 2024 15:52 — forked from jzwiep/docker_compose_assume_iam_role.sh
Assume a specific IAM role with a container via docker-compose
#!/bin/bash
# Assume the role using locally configured AWS credentials, then pass the assumed role to the container via environment
# variables!
ASSUMED_ROLE=$(aws sts assume-role \
--role-arn "arn:aws:iam::000000000000:role/our-role-to-assume" \
--role-session-name "session_name" \
--output text)