Giter Site home page Giter Site logo

ezitubul / rfdocker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asyrjasalo/rfdocker

0.0 0.0 0.0 102 KB

Robot Framework in a Docker container, on slim and official Python 3 Debian Buster image ๐Ÿโœจ๐Ÿค–

Home Page: https://hub.docker.com/r/robotframework/rfdocker

Shell 86.30% RobotFramework 3.42% Dockerfile 10.28%

rfdocker's Introduction

rfdocker

Robot Framework in a Official Python 3 and Debian Buster based (slim) Docker container.

Why?

  1. To run tests in an environment that is well isolated from the host
  2. To get started fast when prototyping/developing own Robot Framework libraries
  3. To be able to take Robot Framework into use where sudo is not available

Usage

Download rfdocker and Dockerfile to where your atest/ are:

curl https://raw.githubusercontent.com/asyrjasalo/rfdocker/master/rfdocker -o rfdocker || \
wget https://raw.githubusercontent.com/asyrjasalo/rfdocker/master/rfdocker -O rfdocker && \
chmod +x rfdocker && \
curl https://raw.githubusercontent.com/asyrjasalo/rfdocker/master/Dockerfile -o Dockerfile || \
wget https://raw.githubusercontent.com/asyrjasalo/rfdocker/master/Dockerfile -O Dockerfile && \
echo "Done."

Then:

./rfdocker

The Robot Framework output files are put in the same directory under results/.

Robot Framework arguments

Any arguments are forwarded to robot inside the container, e.g. the output directory can be renamed with:

./rfdocker --outputdir results/$(date +%Y-%m-%dT%H:%M:%S) atest/

External Robot Framework libraries

Put the external libraries to requirements.txt and uncomment the lines in Dockerfile. The packages are automatically installed inside the container whenever rfdocker is ran.

Customizing docker arguments

You can pass variable BUILD_ARGS to rfdocker to customize docker build arguments, and variable BUILD_DIR to override the path of the directory where Dockerfile and requirements.txt are.

Similarly, you can pass variable RUN_ARGS to rfdocker to e.g. define additional docker run arguments, e.g. to change the default volume mappings or networking.

Building and hosting your own images

The rfdocker images are hosted in Docker Hub, robotframework/rfdocker. The version numbers correspond to the Robot Framework releases.

Since Robot Framework version 3.0.4, Python 2 image is unmaintained.

The images are built with docker/Dockerfile.slimbuster. The image is smoke tested using rfdocker in the repo itself.

Robot Framework version is read from file docker/rf_version, and Python version from file docker/python_version.

To build a new base image:

docker/build_and_test_image

To push the image to your private Docker registry (which you should always do):

REGISTRY_URL=https://your.private.registry/username \
  docker/tag_and_push_image

For pushing to public Docker Hub, you may want to use:

REGISTRY_URL=username \
  docker/tag_and_push_image

Remember to docker login for the script to push to a Docker registry.

Contributing to this repo

Run shellcheck for changes in scripts:

shellcheck rfdocker docker/build_and_test_image docker/tag_and_push_image

I could appreciate some help to have something similar working on Windows.

rfdocker's People

Contributors

asyrjasalo 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.