barbarbar338 / ncfs

🧩 Local game server NGROK to Cloudflare forward script. Make your local server accessible by everyone with your custom domain!
https://hub.docker.com/repository/docker/barbarbar338/ncfs/general
GNU General Public License v3.0
49 stars 6 forks source link

:sparkles: Support Docker #5

Closed HidemaruOwO closed 9 months ago

HidemaruOwO commented 9 months ago

What

Support docker. And add docker compose example

Issue

3

Changed

To confirm the operation before merging, please replace the Dockerfile with the following dockerfile.

FROM ngrok/ngrok:alpine

USER root
# Install dependecies
# RUN apk update
RUN apk add --no-cache jq curl bash git shadow coreutils

# Create USER
RUN adduser --shell $(which bash) --disabled-password app

# Permission
RUN mkdir /app
RUN chown -R app /app

# Change user
USER app
WORKDIR /app

# Setup
# RUN git clone https://github.com/barbarbar338/ncfs.git /app/ncfs
RUN git clone https://github.com/HidemaruOwO/ncfs.git /app/ncfs
RUN cd /app/ncfs && git checkout feature/docker
RUN mv /app/ncfs/ncfs.sh /app
RUN chmod 755 /app/ncfs.sh

EXPOSE 4040
ENTRYPOINT [ "/app/ncfs.sh" ]

Screenshots

Preview - docker compose up ![image](https://github.com/barbarbar338/ncfs/assets/82384920/898b539f-6eda-4552-8741-a1b248f47ed9) - connection ![image](https://github.com/barbarbar338/ncfs/assets/82384920/9db5cab1-f6d7-47ff-b8f9-44763ed77fe4) ![image](https://github.com/barbarbar338/ncfs/assets/82384920/7ad28f00-4f57-4dce-92b0-f58691323621) ![image](https://github.com/barbarbar338/ncfs/assets/82384920/07659374-1b1f-4319-91c0-b4a0b0b0e313)
HidemaruOwO commented 9 months ago

I made a Dockerfile that retrieves files from Git, but is it better to COPY the files from the host?

barbarbar338 commented 9 months ago

Everything looks okay, thank you for your contribution! 🎊