Coder Social home page Coder Social logo

docker-beautifiers's Introduction

Docker Beautifiers Build Status

Docker images for code beautifiers/formatters.

Docker Images

See list of beautifier Docker images at https://hub.docker.com/u/unibeautify/

Name Build Status Pulls Stars Size
autopep8 Docker Build Status Docker Pulls Docker Stars Docker Size
beautysh Docker Build Status Docker Pulls Docker Stars Docker Size
black Docker Build Status Docker Pulls Docker Stars Docker Size
brittany Docker Build Status Docker Pulls Docker Stars Docker Size
ClangFormat Docker Build Status Docker Pulls Docker Stars Docker Size
Crystal Docker Build Status Docker Pulls Docker Stars Docker Size
elm-format Docker Build Status Docker Pulls Docker Stars Docker Size
goimports Docker Build Status Docker Pulls Docker Stars Docker Size
ocp-indent Docker Build Status Docker Pulls Docker Stars Docker Size
php-cs-fixer Docker Build Status Docker Pulls Docker Stars Docker Size
phpcbf Docker Build Status Docker Pulls Docker Stars Docker Size
puppet-lint Docker Build Status Docker Pulls Docker Stars Docker Size
Rscript Docker Build Status Docker Pulls Docker Stars Docker Size
rubocop Docker Build Status Docker Pulls Docker Stars Docker Size
ruby-beautify Docker Build Status Docker Pulls Docker Stars Docker Size
sass-convert Docker Build Status Docker Pulls Docker Stars Docker Size
sqlformat Docker Build Status Docker Pulls Docker Stars Docker Size
uncrustify Docker Build Status Docker Pulls Docker Stars Docker Size

Installation

Docker is required.

Using Whalebrew

  1. Install Whalebrew
  2. whalebrew install unibeautify/BEAUTIFIER
    e.g. whalebrew install unibeautify/php-cs-fixer
  3. Profit! You can now run the installed beautifier command.
    e.g. php-cs-fixer --version

Manually

  1. Pull the Docker image: docker pull unibeautify/BEAUTIFIER
    e.g. docker pull unibeautify/php-cs-fixer
  2. Run the Docker image: docker run -it -v "$(pwd)":/workdir -w /workdir unibeautify/BEAUTIFIER "--version"
    e.g. docker run -it -v "$(pwd)":/workdir -w /workdir unibeautify/php-cs-fixer "--version"

Note: Some tools could change file ownership/permissions upon reformat and/or rewriting. Adding --user "$(id -u):$(id -g)" to your docker run command should prevent this.

docker-beautifiers's People

Contributors

ekilmer avatar glavin001 avatar gorghoa avatar kumekay avatar ntzm avatar renovate-bot avatar stepahn avatar stevenzeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-beautifiers's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Warning

Renovate failed to look up the following dependencies: Failed to look up docker package herpinc/brittany.

Files affected: brittany/Dockerfile


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
autopep8/Dockerfile
beautysh/Dockerfile
black/Dockerfile
  • python 3-alpine
brittany/Dockerfile
  • herpinc/brittany 0.12.1.1
clang-format/Dockerfile
crystal/Dockerfile
elm-format/Dockerfile
  • node 6-slim
goimports/Dockerfile
ocp-indent/Dockerfile
php-cs-fixer/Dockerfile
  • php 7.3.9-alpine
phpcbf/Dockerfile
  • php 7.3-alpine
puppet-lint/Dockerfile
rscript/Dockerfile
rubocop/Dockerfile
ruby-beautify/Dockerfile
sass-convert/Dockerfile
sqlformat/Dockerfile
uncrustify/Dockerfile

  • Check this box to trigger a request for Renovate to run again on this repository

sass-convert image build error

The image for sass-convert is failing to build due to this error:

[91mERROR:  Error installing sass:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/ffi-1.9.18/ext/ffi_c
/usr/local/bin/ruby -r ./siteconf20170925-5-zp3064.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

This looks to be an issue with the ruby:alpine image it's based from. I used FROM ruby and it installed, but of course it's an extra 620 MB download to use.

Version of latest docker build

We wanted to use the latest version of the image of your black. But that image is running 19.3b0 which is not the latest version when u install black locally.

When trying to build our own version we encountered a problem with the installation. You first need to add:

RUN apk add --no-cache --update gcc build-base

So the Dockerfile would look like this:

FROM python:3-alpine

LABEL io.whalebrew.name 'black'
LABEL io.whalebrew.config.working_dir '/workdir'
WORKDIR /workdir

RUN apk add --no-cache --update gcc build-base
RUN pip install --upgrade black

ENTRYPOINT ["black"]
CMD ["--help"]

After building this you have the newest version of black at your disposal ๐Ÿ‘

Build clang in Release

The clang-format Dockerfile builds clang in Debug, it should probably build in Release:

https://github.com/Unibeautify/docker-beautifiers/blob/master/clang-format/Dockerfile#L19

-RUN cmake -GNinja -DLLVM_BUILD_STATIC=ON -DLLVM_ENABLE_LIBCXX=ON ..
+RUN cmake -GNinja -DLLVM_BUILD_STATIC=ON -DLLVM_ENABLE_LIBCXX=ON -DCMAKE_BUILD_TYPE=Release ..

Docker for some reason would be unable to compile and would kill the c++ process if its in Debug (it's also slower to compile)
More info here: https://llvm.org/docs/Docker.html

docker image does not launch to linux command prompt

Follow up from [Unibeautify/docker-beautifiers] installing unibeautify to an existing docker image (#31) where Glavin Wiechert recommended using the existing image. I pulled it as indicated on this code page, and then attempted to launch it. I receive only the result of the version command when I do this....

docker run -it -v C:/ATOMDevelopment:/var/www/html unibeautify/php-cs-fixer:latest "--version"
PHP CS Fixer 2.13.1 Yogi's BBQ by Fabien Potencier and Dariusz Ruminski (54814c6)

And if I try to add the /bin/bash at the end of the line, it just returns to the DOS prompt and does not launch the linux container instance, or at least not that I can get to a command line. But if I look at the container created in Kitematic, the container logs say "command /bin/bash is not defined".

Not sure how to get command line access to this container so that I can see what tools are installed, etc. Can you advise? Thanks.

Tag images based on tool version

Thinking about best practices for reproducibility, it would be necessary to have tagged Docker images for each tool based on version releases.

Although it is unlikely for formatting to change on releases of mature tools like clang-format, it isn't guaranteed, so if a project or developer wants to use a specific version of a formatting tool for a while then there is no way to do that as of now.

Of course, there are almost an infinite number of ways to organize the tagging system, so I'd like to hear what anyone thinks would be helpful.

I am thinking of at least 3-tier system for image tagging:

  1. :HEAD - Latest version of source code for tool pulled from git master or wherever latest development takes place (it could also be a separate branch if the author likes to keep master branch stable and do next-release dev work on a dev branch). This could run nightly in travis (maybe rename tag to :nightly?).
  2. :latest - Latest stable version release of the tool. This should follow the latest tagged/versioned release of the tool.
  3. :$major.$minor - A tagged major and minor version of the tool for people who like to update dependency versions manually.

Since there are so many tools with guaranteed different methods of versioning, it would be smart to implement this in a way that leaves room for someone to maintain tags at a more granular level like :$major.$minor.$patch or something.

Thoughts? Comments? Concerns?

As for implementation, I haven't thought too hard about how to use Travis most effectively (i.e. build only :HEAD unless there is a new version release). To detect new releases, maybe there is a way to automatically tag by looking at a tool's git/svn tags? This would be a natural correspondence for docker image tags and releases.

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.