Skip to content

Instantly share code, notes, and snippets.

View dluman's full-sized avatar

Douglas Luman dluman

View GitHub Profile
@dluman
dluman / build_gdb.sh
Last active December 18, 2023 19:11 — forked from m0sys/build_gdb.sh
Apple ARM GDB Build from Source with Python Support
#!/usr/bin/env sh
# NOTE: First, have to ignore the following warnings to make it build on M1/M2 Chip.
#
# -Wno-constant-logical-operand -Wno-format-nonliteral -Wno-self-assign
#
# To do so the above line should be appended to consts CFLAGS and CXXFLAGS
# under the 'Programs producing files for the HOST machine' section of
# the generated Makefile in dir 'build-gdb'.
@dluman
dluman / arm-cheatsheet.pdf
Created September 10, 2024 14:36 — forked from s-aguado/arm-cheatsheet.pdf
ARMv6-M Instruction Set Cheatsheet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Problem

When I use docker to work with the shared workspace with host under Ubuntu, I find that files created by docker user is owned by root. This is not the same with macOS.

Maybe this is becuase docker is run by root user and the default user mapping mechanism is to map container-root to host-user or host-root. So can I map the container-root or container-any-user to host-current-user?

Fortunately the latest docker supports the re-map the container user to any host user via Linux namespace. Refer to this.

Linux namespace