Skip to content

Commit

Permalink
formatting Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipGlover committed Feb 5, 2024
1 parent af01ad1 commit 4f3f40a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
FROM node:20

ARG SSH_KEY
ENV SSH_KEY=$SSH_KEY
# Make ssh dir
RUN mkdir /root/.ssh/
# Create id_rsa from string arg, and set permissions
RUN echo "$SSH_KEY" > /root/.ssh/id_rsa
RUN echo "$SSH_KEY" >/root/.ssh/id_rsa
RUN chmod 600 /root/.ssh/id_rsa
# Create known_hosts
RUN touch /root/.ssh/known_hosts
# Add git providers to known_hosts
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN ssh-keyscan gitlab.com >> /root/.ssh/known_hosts
RUN ssh-keyscan bitbucket.org >>/root/.ssh/known_hosts
RUN ssh-keyscan github.com >>/root/.ssh/known_hosts
RUN ssh-keyscan gitlab.com >>/root/.ssh/known_hosts
WORKDIR /app
COPY package*.json ./
RUN npm install
Expand Down

0 comments on commit 4f3f40a

Please sign in to comment.