mirror of
https://github.com/pushbits/server.git
synced 2025-04-30 02:36:53 +02:00
Install curl in Docker image
This commit is contained in:
parent
901e94448b
commit
56deb96d4e
2 changed files with 7 additions and 6 deletions
10
Dockerfile
10
Dockerfile
|
@ -5,11 +5,7 @@ WORKDIR /build
|
|||
COPY . .
|
||||
|
||||
RUN set -ex \
|
||||
&& apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache build-base \
|
||||
&& apk add --no-cache ca-certificates \
|
||||
&& update-ca-certificates \
|
||||
&& go mod download \
|
||||
&& go mod verify \
|
||||
&& make build \
|
||||
|
@ -17,6 +13,8 @@ RUN set -ex \
|
|||
|
||||
FROM alpine
|
||||
|
||||
ARG USER_ID=1000
|
||||
|
||||
ENV PUSHBITS_HTTP_PORT="8080"
|
||||
|
||||
EXPOSE 8080
|
||||
|
@ -27,11 +25,13 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|||
COPY --from=builder /build/app ./run
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache ca-certificates curl \
|
||||
&& update-ca-certificates \
|
||||
&& mkdir -p /data \
|
||||
&& ln -s /data/pushbits.db /app/pushbits.db \
|
||||
&& ln -s /data/config.yml /app/config.yml
|
||||
|
||||
USER 1000
|
||||
USER ${USER_ID}
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s CMD curl --fail http://localhost:$PUSHBITS_HTTP_PORT/health || exit 1
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[](https://github.com/pushbits/server/actions)
|
||||
[](https://hub.docker.com/r/eikendev/pushbits)
|
||||
[](https://hub.docker.com/r/eikendev/pushbits)
|
||||
[](https://hub.docker.com/r/eikendev/pushbits)
|
||||

|
||||
|
||||
# PushBits
|
||||
|
|
Loading…
Add table
Reference in a new issue