-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (24 loc) · 769 Bytes
/
Dockerfile
File metadata and controls
29 lines (24 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM ubuntu:22.04
SHELL ["/bin/bash", "-c"]
RUN apt -yqq update
RUN apt -yqq install curl systemctl
RUN mkdir -p /opt/sg
ARG SG_DEB
RUN [ -z "$SG_DEB" ] && echo "SG_DEB is required" && exit 1 || true
RUN ARCHITECTURE="$(dpkg --print-architecture)" && \
if [ "$ARCHITECTURE" = "amd64" ]; then \
curl -o /opt/sg/couchbase-sync-gateway.deb ${SG_DEB/<ARCH>/x86_64}; \
elif [ "$ARCHITECTURE" = "arm64" ]; then \
curl -o /opt/sg/couchbase-sync-gateway.deb ${SG_DEB/<ARCH>/aarch64}; \
else \
echo "Unsupported architecture"; \
exit 1; \
fi
RUN dpkg -i /opt/sg/couchbase-sync-gateway.deb
COPY cert /opt/sg/cert
COPY config /opt/sg/config
COPY start-sgw.sh /opt/sg
WORKDIR /opt/sg
EXPOSE 4984
EXPOSE 4985
CMD ./start-sgw.sh