Update Dockerfile
Browse files- Dockerfile +4 -16
Dockerfile
CHANGED
|
@@ -1,25 +1,13 @@
|
|
| 1 |
# Official 2026 Stable Image
|
| 2 |
FROM ghcr.io/anomalyco/opencode:latest
|
| 3 |
|
| 4 |
-
# We skip the manual user creation to avoid the 'exit code 1' crash
|
| 5 |
USER root
|
| 6 |
-
|
|
|
|
| 7 |
WORKDIR /home/user/app
|
| 8 |
|
| 9 |
-
# Set port for Hugging Face
|
| 10 |
ENV PORT=7860
|
| 11 |
EXPOSE 7860
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
FROM ghcr.io/anomalyco/opencode:latest
|
| 16 |
-
|
| 17 |
-
USER root
|
| 18 |
-
RUN mkdir -p /home/user/app/my-project && chmod -R 777 /home/user/app
|
| 19 |
-
WORKDIR /home/user/app
|
| 20 |
-
|
| 21 |
-
ENV PORT=7860
|
| 22 |
-
EXPOSE 7860
|
| 23 |
-
|
| 24 |
-
# We add "." at the end to tell it to start the project in the current folder
|
| 25 |
-
CMD ["opencode", "web", "--host", "0.0.0.0", "--port", "7860", "--no-auth", "."]
|
|
|
|
| 1 |
# Official 2026 Stable Image
|
| 2 |
FROM ghcr.io/anomalyco/opencode:latest
|
| 3 |
|
|
|
|
| 4 |
USER root
|
| 5 |
+
# Create a folder for your work
|
| 6 |
+
RUN mkdir -p /home/user/app/project && chmod -R 777 /home/user/app
|
| 7 |
WORKDIR /home/user/app
|
| 8 |
|
|
|
|
| 9 |
ENV PORT=7860
|
| 10 |
EXPOSE 7860
|
| 11 |
|
| 12 |
+
# This command tells it to start the WEB UI in the 'project' folder
|
| 13 |
+
CMD ["opencode", "web", "--host", "0.0.0.0", "--port", "7860", "--no-auth", "project"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|