Spaces:
Sleeping
Sleeping
| FROM gitpod/workspace-node | |
| # Chạy lệnh với quyền root | |
| USER root | |
| # Cài đặt các gói cần thiết | |
| RUN apt-get update && apt-get install --no-install-recommends -y \ | |
| pcscd \ | |
| libpcsclite-dev \ | |
| python3 \ | |
| python3-setuptools \ | |
| python3-pycryptodome \ | |
| python3-pyscard \ | |
| python3-pip && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN npm install -g http-server | |
| # ENV PATH="/home/user/.local/bin:$PATH" | |
| # COPY --chown=user ./requirements.txt requirements.txt | |
| # COPY --chown=user . /app | |
| USER 0 | |
| RUN useradd -u 1000 -m -s /bin/bash node | |
| # Thêm user 1000 vào nhóm sudo | |
| RUN usermod -aG sudo node | |
| # Đổi mật khẩu của root thành 123456 | |
| RUN echo "root:123456" | chpasswd | |
| RUN mkdir /app && chown 1000:1000 /app | |
| WORKDIR /app | |
| RUN chmod -R 777 /home/gitpod/ /home/gitpod/.gitconfig /home/gitpod/.config/ | |
| USER gitpod | |
| CMD ["http-server", ".", "-p", "7860"] |