Skip to content

Commit

Permalink
fix: fix docker ca
Browse files Browse the repository at this point in the history
  • Loading branch information
gitsang committed Dec 8, 2021
1 parent ad628fc commit c5a315f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM ubuntu

ARG DOCKER_PACKAGE_PATH
ARG DOCKER_PACKAGE_PATH
ENV DOCKER_PACKAGE_PATH ${DOCKER_PACKAGE_PATH}

ENV SERVICE_NAME=ddns
ENV SERVICE_HOME=/opt/${SERVICE_NAME}
ENV PATH=$PATH:${SERVICE_HOME}/bin

COPY ${DOCKER_PACKAGE_PATH} ${SERVICE_HOME}
WORKDIR ${SERVICE_HOME}/bin
RUN apt update
RUN apt install -y --no-install-recommends ca-certificates curl
RUN update-ca-certificates

WORKDIR ${SERVICE_HOME}/bin
ENTRYPOINT [ "ddns" ]
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,16 @@ docker: build ## build docker and push
docker push $(DOCKER_REPO)/$(SERVICE_NAME):$(VERSION)
docker push $(DOCKER_REPO)/$(SERVICE_NAME):latest

run:

mkdir -p /data/ddns/conf /data/ddns/log
cp configs/private.yml /data/ddns/conf/ddns.yml
docker pull $(DOCKER_REPO)/$(SERVICE_NAME):latest
docker rm -f ddns
docker run -d \
--name ddns \
--restart always \
--network host \
-v /data/ddns/conf/ddns.yml:/opt/ddns/conf/ddns.yml \
-v /data/ddns/log:/opt/ddns/log \
$(DOCKER_REPO)/$(SERVICE_NAME):latest

0 comments on commit c5a315f

Please sign in to comment.