Skip to content

leoli0605/docker-arm-none-eabi-gcc

Repository files navigation

jafee201153/arm-none-eabi-gcc Docker Pulls Docker Stars

Let's build your project with arm-none-eabi-gcc in a docker container.

Features

  • Based on ubuntu:20.04
  • git and make are pre-installed
  • Environment variables
    • TZ: Timezone, default is Asia/Taipei
    • USER_NAME: User name
    • USER_UID: User ID
    • USER_GID: Group ID

Usage

# Running as root user
GCC_VERSION=latest \
HOST_TZ=$(cat /etc/timezone) \
docker run -it --rm \
    -e TZ=$HOST_TZ \
    -v "$(pwd)":/share \
    -w /share \
    jafee201153/arm-none-eabi-gcc:$GCC_VERSION /bin/bash
# Running as non-root user
GCC_VERSION=latest \
HOST_TZ=$(cat /etc/timezone) \
USER_NAME=$(whoami) \
USER_UID=$(id -u $USER_NAME) \
USER_GID=$(id -g $USER_NAME) \
docker run -it --rm \
    -e TZ=$HOST_TZ \
    -e USER_NAME=$USER_NAME \
    -e USER_UID=$USER_UID \
    -e USER_GID=$USER_GID \
    -v "$(pwd)":/home/$USER_NAME/share \
    -w /home/$USER_NAME/share \
    jafee201153/arm-none-eabi-gcc:$GCC_VERSION /bin/bash

Example

# Build the project
GCC_VERSION=latest \
HOST_TZ=$(cat /etc/timezone) \
USER_NAME=$(whoami) \
USER_UID=$(id -u $USER_NAME) \
USER_GID=$(id -g $USER_NAME) \
docker run -it --rm \
    -e TZ=$HOST_TZ \
    -e USER_NAME=$USER_NAME \
    -e USER_UID=$USER_UID \
    -e USER_GID=$USER_GID \
    -v "$(pwd)":/home/$USER_NAME/share \
    -w /home/$USER_NAME/share \
    jafee201153/arm-none-eabi-gcc:$GCC_VERSION /bin/bash \
    -c "make clean && make all"

Support

If you encounter any issues or have suggestions, please open an issue on our GitHub repository.