Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Sijie Shen <[email protected]>
  • Loading branch information
ds-ssj committed May 16, 2024
1 parent e59437f commit 58c3e11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

RUN if [ "$build_type" = "All" ]; then \
apt-get update && apt-get install -y \
openssh-server \
apt-get install -y openssh-server \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /var/run/sshd; \
&& mkdir -p /var/run/sshd \
&& echo "mkdir -p /root/.ssh && ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa" >> /workspace/env_script.sh \
&& echo "cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys" >> /workspace/env_script.sh \
&& echo "service ssh start" >> /workspace/env_script.sh; \
&& echo "service ssh start" >> /workspace/env_script.sh \
fi

# Install PostgreSQL and MySQL
Expand Down Expand Up @@ -77,5 +76,6 @@ RUN if [ "$build_type" = "All" ]; then \
CMD ["/bin/bash", "-c", ". /workspace/env_script.sh && /bin/bash"]

# Example:
# docker rm gart0; docker image rm gart; docker build -t gart .
# docker rm gart0; docker image rm gart
# docker build -t gart .
# docker run -it --name gart0 gart

0 comments on commit 58c3e11

Please sign in to comment.