Initial commit
This commit is contained in:
40
Dockerfile.cloudron
Normal file
40
Dockerfile.cloudron
Normal file
@ -0,0 +1,40 @@
|
||||
FROM cloudron/base:5.0.0@sha256:04fd70dbd8ad6149c19de39e35718e024417c3e01dc9c6637eaf4a41ec4e596c
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
ca-certificates \
|
||||
netcat-openbsd \
|
||||
bash \
|
||||
jq \
|
||||
yq \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Go
|
||||
ENV GO_VERSION=1.21.4
|
||||
RUN curl -LO https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz \
|
||||
&& tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \
|
||||
&& rm go${GO_VERSION}.linux-amd64.tar.gz
|
||||
ENV PATH="/usr/local/go/bin:$PATH"
|
||||
|
||||
# Create app directories
|
||||
RUN mkdir -p /app/code /app/pkg /app/data
|
||||
WORKDIR /app/code
|
||||
|
||||
# Download and build mautrix-whatsapp
|
||||
RUN git clone https://github.com/mautrix/whatsapp.git . \
|
||||
&& go build -o /app/pkg/mautrix-whatsapp
|
||||
|
||||
# Copy startup script
|
||||
COPY start.sh /app/pkg/
|
||||
|
||||
# Set volumes and environment
|
||||
VOLUME /app/data
|
||||
ENV UID=1337 GID=1337
|
||||
|
||||
# Add health check endpoint
|
||||
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s --retries=3 \
|
||||
CMD curl -f http://localhost:29318/health || exit 1
|
||||
|
||||
CMD ["/app/pkg/start.sh"]
|
Reference in New Issue
Block a user