Spaces:
Paused
Paused
Update Dockerfile for CodeBrain
Browse files- Dockerfile +21 -0
Dockerfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM alpine:3.19
|
| 2 |
+
|
| 3 |
+
RUN apk add --no-cache ca-certificates git curl iptables ip6tables
|
| 4 |
+
|
| 5 |
+
# Install Tailscale
|
| 6 |
+
RUN curl -fsSL https://pkgs.tailscale.com/stable/tailscale_1.58.2_amd64.tgz \
|
| 7 |
+
| tar xz -C /usr/local/bin --strip-components=1 tailscale_1.58.2_amd64/tailscale tailscale_1.58.2_amd64/tailscaled
|
| 8 |
+
|
| 9 |
+
# Create state directories
|
| 10 |
+
RUN mkdir -p /var/run/tailscale /var/lib/tailscale /home/megamind/data
|
| 11 |
+
RUN adduser -D -u 1000 megamind
|
| 12 |
+
RUN chown -R megamind:megamind /home/megamind /var/run/tailscale /var/lib/tailscale
|
| 13 |
+
|
| 14 |
+
WORKDIR /home/megamind
|
| 15 |
+
COPY megamind-linux-amd64 /usr/local/bin/megamind
|
| 16 |
+
COPY config.json /home/megamind/config.json
|
| 17 |
+
COPY startup.sh /home/megamind/startup.sh
|
| 18 |
+
RUN chmod +x /home/megamind/startup.sh /usr/local/bin/megamind
|
| 19 |
+
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
CMD ["/home/megamind/startup.sh"]
|