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

fix(docker): ensure gitconfig is stored in the right place #1178

Merged
merged 1 commit into from
Mar 1, 2024
Merged
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
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ RUN npm ci
RUN rm -rf /var/cache/apk/*

RUN git config --system --add safe.directory '*'
RUN echo "[user]" > /root/.gitconfig
RUN echo " name = Isomer Admin" >> /root/.gitconfig
RUN echo " email = [email protected]" >> /root/.gitconfig

RUN chmod +x ./scripts/02_fetch_ssh_keys.sh

Expand All @@ -38,5 +35,10 @@ RUN chown -R webapp:webapp /home/webapp/.ssh
# NOTE: We need to run the app as webapp, otherwise we will encounter
# permissions issues on EFS, and all files will be erroneously owned by root.
USER webapp

RUN echo "[user]" > /home/webapp/.gitconfig
RUN echo " name = Isomer Admin" >> /home/webapp/.gitconfig
RUN echo " email = [email protected]" >> /home/webapp/.gitconfig

EXPOSE "8081"
CMD ["bash", "-c", "bash ./scripts/02_fetch_ssh_keys.sh & npm run start:ecs:$NODE_ENV"]
Loading