soxogvv commited on
Commit
5fd98a9
Β·
verified Β·
1 Parent(s): 26bf16f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -46,16 +46,18 @@ RUN python3 -m venv /root/venv && \
46
  RUN npm config set prefix /root/.npm-global && \
47
  npm install -g shellular
48
 
49
- # ── Drop into /data on every interactive SSH/exec session ────────────────────
50
- RUN echo 'cd /data' >> /root/.bashrc
 
 
51
 
52
  # ── App ───────────────────────────────────────────────────────────────────────
53
  COPY package*.json /root/app/
54
  RUN cd /root/app && npm install --omit=dev
55
  COPY . /root/app/
56
 
57
- # ── Entrypoint β€” sets live hostname, then launches app ───────────────────────
58
- RUN printf '#!/bin/sh\nhostname kanha\nexec "$@"\n' > /usr/local/bin/docker-entrypoint.sh && \
59
  chmod +x /usr/local/bin/docker-entrypoint.sh
60
 
61
  # ── Runtime ───────────────────────────────────────────────────────────────────
 
46
  RUN npm config set prefix /root/.npm-global && \
47
  npm install -g shellular
48
 
49
+ # ── Create /data and ensure all shells land there ────────────────────────────
50
+ RUN mkdir -p /data && \
51
+ echo 'cd /data' >> /root/.bash_profile && \
52
+ echo 'cd /data' >> /root/.bashrc
53
 
54
  # ── App ───────────────────────────────────────────────────────────────────────
55
  COPY package*.json /root/app/
56
  RUN cd /root/app && npm install --omit=dev
57
  COPY . /root/app/
58
 
59
+ # ── Entrypoint β€” no hostname call (already baked into /etc/hostname) ──────────
60
+ RUN printf '#!/bin/sh\nexec "$@"\n' > /usr/local/bin/docker-entrypoint.sh && \
61
  chmod +x /usr/local/bin/docker-entrypoint.sh
62
 
63
  # ── Runtime ───────────────────────────────────────────────────────────────────