Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust dockerfile #45

Merged
merged 4 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions docker/greenmask/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@ RUN apt-get update \

COPY --from=build /var/lib/greenmask/greenmask /usr/bin

RUN mkdir /home/greenmask \
&& groupadd -g 10001 greenmask \
&& useradd -u 10000 -g greenmask greenmask \
&& chown -R greenmask:greenmask /home/greenmask

USER greenmask:greenmask

RUN mkdir ~/.bash_completions \
&& greenmask completion bash > /root/.bash_completions/greenmask.bash \
&& echo 'source /etc/bash_completion' >> /root/.bashrc \
&& echo 'source /root/.bash_completions/greenmask.bash' >> /root/.bashrc
&& greenmask completion bash > ~/.bash_completions/greenmask.bash \
&& echo 'source /etc/bash_completion' >> ~/.bashrc \
&& echo 'source ~/.bash_completions/greenmask.bash' >> ~/.bashrc

ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["greenmask"]
wwoytenko marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 4 additions & 4 deletions playground/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
echo "alias psql='psql -U postgres -d $ORIGINAL_DB_NAME -h playground-db'" >> /root/.bashrc
echo "alias psql_o='psql -U postgres -d $ORIGINAL_DB_NAME -h playground-db'" >> /root/.bashrc
echo "alias psql_t='psql -U postgres -d $TRANSFORMED_DB_NAME -h playground-db'" >> /root/.bashrc
echo "alias cleanup='/var/lib/playground/cleanup.sh'" >> /root/.bashrc
echo "alias psql='psql -U postgres -d $ORIGINAL_DB_NAME -h playground-db'" >> ~/.bashrc
echo "alias psql_o='psql -U postgres -d $ORIGINAL_DB_NAME -h playground-db'" >> ~/.bashrc
echo "alias psql_t='psql -U postgres -d $TRANSFORMED_DB_NAME -h playground-db'" >> ~/.bashrc
echo "alias cleanup='/var/lib/playground/cleanup.sh'" >> ~/.bashrc
bash