Update Dockerfile
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
|
@@ -11,16 +11,19 @@ USER coder
|
|
| 11 |
ENV HOME=/home/coder
|
| 12 |
WORKDIR /home/coder
|
| 13 |
|
| 14 |
-
#
|
|
|
|
|
|
|
|
|
|
| 15 |
ENV CODER_VERSION=2.23.1
|
| 16 |
RUN curl -L "https://github.com/coder/coder/releases/download/v${CODER_VERSION}/coder_${CODER_VERSION}_linux_amd64.tar.gz" | tar -xz \
|
| 17 |
-
&& mv coder /home/coder/.local/bin \
|
| 18 |
&& chmod +x /home/coder/.local/bin/coder
|
| 19 |
|
| 20 |
ENV PATH="/home/coder/.local/bin:$PATH"
|
| 21 |
|
| 22 |
# Expose Coder server port
|
| 23 |
-
EXPOSE
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
CMD ["coder", "server", "--host", "0.0.0.0", "--port", "
|
|
|
|
| 11 |
ENV HOME=/home/coder
|
| 12 |
WORKDIR /home/coder
|
| 13 |
|
| 14 |
+
# Create bin directory for local binaries
|
| 15 |
+
RUN mkdir -p /home/coder/.local/bin
|
| 16 |
+
|
| 17 |
+
# Download and extract Coder binary (no dpkg/sudo)
|
| 18 |
ENV CODER_VERSION=2.23.1
|
| 19 |
RUN curl -L "https://github.com/coder/coder/releases/download/v${CODER_VERSION}/coder_${CODER_VERSION}_linux_amd64.tar.gz" | tar -xz \
|
| 20 |
+
&& mv coder /home/coder/.local/bin/coder \
|
| 21 |
&& chmod +x /home/coder/.local/bin/coder
|
| 22 |
|
| 23 |
ENV PATH="/home/coder/.local/bin:$PATH"
|
| 24 |
|
| 25 |
# Expose Coder server port
|
| 26 |
+
EXPOSE 3000
|
| 27 |
|
| 28 |
+
# Run Coder server on container start
|
| 29 |
+
CMD ["coder", "server", "--host", "0.0.0.0", "--port", "3000"]
|