forked from macisamuele/language-formatters-pre-commit-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add ability to run pretty-format-java inside this docker container
- Loading branch information
1 parent
88ff37c
commit 060d778
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# Make sure dependencies are installed | ||
RUN apt-get update && apt-get install -y python3 python3-pip | ||
RUN apt-get install -y python3-setuptools | ||
RUN apt install -y default-jre | ||
RUN pip3 install setuptools --upgrade | ||
|
||
# Put the source files in the build container | ||
COPY . /src/ | ||
|
||
# Set working directory to where we want to run install commands from | ||
WORKDIR /src | ||
|
||
# Install formattters to container | ||
RUN python3 /src/setup.py install | ||
|
||
# Configure environment variables into writeable directory | ||
RUN mkdir -p /src/cache/.python-eggs | ||
RUN chmod 777 /src/cache | ||
ENV PYTHON_EGG_CACHE=/src/cache/.python-eggs | ||
ENV PRE_COMMIT_HOME /src/cache | ||
|
||
ENTRYPOINT /bin/bash |