ltex-ls icon indicating copy to clipboard operation
ltex-ls copied to clipboard

Add a Dockerfile for container image building

Open BaptisteRoseau opened this issue 1 year ago • 3 comments

Description

LTeX is very useful and could also be used in CI/CD pipelines or any other environment lacking java. To run it everywhere it could be great to have a container image available.

Actions

I simply added a Dockerfile to build an LTeX image.

Tests

To test the container image, install a container solution such as Docker or Podman. For this tests we will use podman but the commands are the same.

  1. Clone the repository
  2. Go in the repository's root directory
  3. Run the command podman build -t ltex:latest .
  4. Wait for the build to complete
  5. Run the following command:
podman run -it --rm -v path/to/test/files:/files localhost/ltex:latest ltex-cli /files

Of course, replace path/to/test/files with an actual directory container files to be checked. Don't worry about the --rm option, it is to remove the container instance after running.

BaptisteRoseau avatar May 24 '23 21:05 BaptisteRoseau

We could also remove the ENTRYPOINT to let the choice to the user to choose between ltex-ls and ltex-cli.

BaptisteRoseau avatar May 24 '23 21:05 BaptisteRoseau

Ok I removed the ENTRYPOINT to use a CMD instead so the user could use both ltext-cli and ltext-ls from the same image.

I do not plan on making any change unless you require me to do some modifications :D

BaptisteRoseau avatar May 24 '23 22:05 BaptisteRoseau

I really would love to see that feature

SirNoName2705 avatar Dec 16 '23 23:12 SirNoName2705