Commit 286edaab authored by nanahira's avatar nanahira

first

parent 30d0a598
Pipeline #946 passed with stages
in 4 minutes and 37 seconds
stages:
- build
- deploy
variables:
GIT_DEPTH: "1"
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build:
stage: build
tags:
- docker
script:
- docker build --pull -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
deploy_latest:
stage: deploy
tags:
- docker
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
only:
- master
deploy_tag:
stage: deploy
tags:
- docker
variables:
CONTAINER_TAG_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_TAG_IMAGE
- docker push $CONTAINER_TAG_IMAGE
only:
- tags
FROM debian:buster-slim
RUN apt update && \
env DEBIAN_FRONTEND=noninteractive apt install -y wide-dhcpv6-client gettext-base && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir -p /usr/src/app
COPY ./dhcp6c.conf.template /usr/src/app/
COPY ./entrypoint.sh /usr/src/app/
ENV WAN_INTERFACE ppp0
ENV LAN_INTERFACE ens192
ENTRYPOINT [ "/usr/src/app/entrypoint.sh" ]
CMD ["bash", "-c", "/usr/sbin/dhcp6c -f -d -c /etc/wide-dhcpv6/dhcp6c.conf -Pdefault $WAN_INTERFACE" ]
# docker-dhcpv6-client
Dockerlized wide-dhcpv6-client
\ No newline at end of file
Dockerlized wide-dhcpv6-client
## Variables
* `WAN_INTERFACE` The interface for Internet, or the interface sending DHCPv6 requests.
* `LAN_INTERFACE` The interface for LAN. If more than one please run multiple containers.
profile default
{
send ia-pd 0;
};
id-assoc pd 0 {
# use the interface connected to your LAN
prefix-interface $LAN_INTERFACE {
sla-id 1;
sla-len 4;
};
};
#!/bin/bash
cat /usr/src/app/dhcp6c.conf.template | envsubst > /etc/wide-dhcpv6/dhcp6c.conf
"$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment