Skip to content

Commit

Permalink
add node.js to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Corya committed Feb 13, 2024
1 parent a9c4226 commit bab91a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ FROM ubuntu:22.04
WORKDIR /root

RUN apt-get update && apt-get upgrade -y && \
apt-get install -y wget openssh-server jq && \
apt-get install -y curl wget jq && \
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \
wget https://github.com/AIOZNetwork/aioz-dcdn-cli-node/files/13561211/aioznode-linux-amd64-1.1.0.tar.gz && \
tar xf aioznode-linux-amd64-1.1.0.tar.gz && \
mv ./aioznode-linux-amd64-1.1.0 /usr/local/bin/aioznode && \
rm aioznode-linux-amd64-1.1.0.tar.gz && \
mkdir -p /run/sshd
rm aioznode-linux-amd64-1.1.0.tar.gz

EXPOSE 13172

Expand All @@ -17,3 +18,5 @@ COPY ./config.toml /root/.aiozworker/config/config.toml
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT ["entrypoint.sh"]

CMD ["--help"]
10 changes: 0 additions & 10 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#!/bin/bash

# Modify default sshd_config
sed -i s/#Port\ 22.*/Port\ 13172/ /etc/ssh/sshd_config
sed -i s/#PermitRootLogin\ prohibit-password.*/PermitRootLogin\ prohibit-password/ /etc/ssh/sshd_config

# Create directory for keys
mkdir -p /root/.ssh

# Start ssh server
/usr/sbin/sshd

# Initialize private key if one does not exist
if ! test -f /root/.aiozworker/privkey.json; then
mkdir -p /root/.aiozworker/
Expand Down

0 comments on commit bab91a6

Please sign in to comment.