Coder Social home page Coder Social logo

tssganesh / ubuntush Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 24 KB

The repository contains Dockerfile and scrip.sh to build an image with shell script. The image is based on ubuntu:latest image and script prints out the values to the console.

Shell 65.96% Dockerfile 34.04%

ubuntush's Introduction

Overview: The repository is useful for running Custom Script(Shell script) Inside Docker container.

Files:

  • Dockerfile
  • main.sh

Main.sh:

  • Prints incremental values to the console.
  • In the beginning of the file mention "#!/bin/bash". Otherwise, the script won't be run and results in an error.

Dockerfile

  • Base image is ubuntu
  • Copies the main.sh script from the repository to the root directory
  • Converts the main.sh to the executable using chmod command
  • Uses CMD to invoke the main.sh file( When running the container main.sh script will be invoked)
  • If / is not specified in the CMD, container looks in the Path directory for the executable.

Building the docker image:

  • To build the docker file, download the repository and ensure that you are in the same directory where Dockerfile and main.sh files are located
  • Execute the below command
  • docker build -t="localimageName" .
  • Verifify the image using "docker images" command
  • docker run --rm -it localimageName
  • It prints the variable value and also waits for 2 seconds to display the next incremented value.

ubuntush's People

Contributors

tssganesh avatar gstanuku avatar

Watchers

 avatar

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.