Giter Club home page Giter Club logo

docker-browsepy's Introduction

Docker browsepy

Makes use of https://github.com/ergoithz/browsepy to browse files from a specific directory. Uses https://github.com/tianon/gosu runs a browsepy as a non-root user.

docker pull blankdots/docker-browsepy

How to Build

Simple way of building the container locally:

docker build -t blankdots/docker-browsepy

How to Run

Deploy with Docker

  • Run with a local folder attached (recommended):
docker run -p 5050:5050 -v /local/folder:/files blankdots/docker-browsepy
  • Run as part of docker compose:
version: '2'
services:

  browser:
    image: blankdots/docker-browsepy
    volumes:
      - /local/folder:/files
    ports:
      - '5050:5050'

By default it runs the command: gosu nonroot browsepy 0.0.0.0 5050 --directory /files, but it can be overwritten.

Deploy with Kubernetes

Example of YAML files for deploying to kubernetes:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    role: file-browser
  name: browsepy
  namespace: browser
spec:
  selector:
    matchLabels:
      app: browsepy
  template:
    metadata:
      labels:
        app: browsepy
        role: file-browser
    spec:
      containers:
        - image: 'blankdots/docker-browsepy'
          imagePullPolicy: Always
          command: ["browsepy", "0.0.0.0", "5050", "--directory", "/files"]
          name: browsepy
          ports:
            - containerPort: 5050
              name: browsepy
              protocol: TCP
          volumeMounts:
            - mountPath: /files
              name: data
      volumes:
        - name: data
          # persistentVolumeClaim:
          #  claimName: browsepy-data
          hostPath:
            path: /local/path
---
apiVersion: v1
kind: Service
metadata:
  name: browsepy
  labels:
    app: browsepy
  namespace:browser
spec:
  type: NodePort
  ports:
  - port: 5050
    targetPort: 5050
    protocol: TCP
    name: web
  selector:
    app: browsepy

How to access the files:

Go to http://hostname:5050

docker-browsepy's People

Contributors

blankdots avatar gines-carrascal 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.