GithubHelp home page GithubHelp logo

balena-io-experimental / hostname Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 64 KB

Utility block to set a device's hostname in balenaOS

Home Page: https://hub.balena.io/blocks

Shell 100.00%
hub balena hostname

hostname's Introduction

hostname

An utility block to set the hostname of devices running balenaOS.

Disclaimer: Setting the hostname on a device running balenaOS is as easy as hitting an API endpoint on the supervisor. This utility wraps the required http request into a prebuilt image that you can drop on your projects. It's clearly NOT the most efficient approach as the device needs to download and run an additional container. See our documentation for specifics on how to roll this into your own services.

Usage

Prebuilt images

We maintain images for this block on balenaHub Container Registry. The images can be accessed using:

bh.cr/g_tomas_migone1/hostname-<arch> or bhcr.io/g_tomas_migone1/hostname-<arch> where <arch> is one of: rpi, armv7hf, aarch64 or amd64.

For details on how to select a specific version or commit version of the image see our documentation.

docker-compose file

To use this image, create a container in your docker-compose.yml file and set the SET_HOSTNAME environment variable as shown below:

version: '2'

services:

  hostname:
    image: bh.cr/g_tomas_migone1/hostname
    restart: no                               # Required to avoid container restarting indefinitely
    labels:
      io.balena.features.supervisor-api: 1    # Required to interact with the supervisor
    environment:
      SET_HOSTNAME: balena-test-hostname

hostname's People

Contributors

balena-ci avatar klutchell avatar tmigone avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

puccaso samizdapp

hostname's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.