don't set root password in docker image

master
Jordan Sokolic 2020-09-15 22:34:47 +03:00
parent 1eede6ba73
commit dbf86ca128
5 changed files with 0 additions and 8 deletions

View File

@ -1,7 +1,5 @@
FROM scratch FROM scratch
ADD rootfs.tar.gz / ADD rootfs.tar.gz /
ARG ROOT_PW
RUN echo -e "${ROOT_PW}\n${ROOT_PW}" | passwd
RUN mkdir -p /var/lock RUN mkdir -p /var/lock
RUN opkg remove dnsmasq && \ RUN opkg remove dnsmasq && \
opkg update && \ opkg update && \

View File

@ -1,7 +1,5 @@
FROM scratch FROM scratch
COPY . . COPY . .
ARG ROOT_PW
RUN echo -e "${ROOT_PW}\n${ROOT_PW}" | passwd
RUN mkdir -p /var/lock RUN mkdir -p /var/lock
RUN opkg update && \ RUN opkg update && \
opkg install \ opkg install \

View File

@ -14,8 +14,6 @@ rootfs.tar.gz:
build: rootfs.tar.gz build: rootfs.tar.gz
docker build \ docker build \
--build-arg ROOT_PW \
--build-arg OPENWRT_SOURCE_VER \
--build-arg ts="$(shell date)" \ --build-arg ts="$(shell date)" \
--build-arg version="${OPENWRT_SOURCE_VER}" \ --build-arg version="${OPENWRT_SOURCE_VER}" \
-t ${IMAGE_TAG} . -t ${IMAGE_TAG} .

View File

@ -31,7 +31,6 @@ mount_rootfs() {
docker_build() { docker_build() {
echo "* building Docker image" echo "* building Docker image"
docker build \ docker build \
--build-arg ROOT_PW="${ROOT_PW}" \
--build-arg ts="$(date)" \ --build-arg ts="$(date)" \
--build-arg version="${VERSION:-$OPENWRT_SOURCE_VER}" \ --build-arg version="${VERSION:-$OPENWRT_SOURCE_VER}" \
-t ${IMAGE_TAG} -f Dockerfile.rpi ${tmpdir} -t ${IMAGE_TAG} -f Dockerfile.rpi ${tmpdir}

View File

@ -7,7 +7,6 @@ OPENWRT_SOURCE_VER=19.07.4
IMAGE_TAG=oofnik/openwrt IMAGE_TAG=oofnik/openwrt
# container name # container name
CONTAINER=openwrt_1 CONTAINER=openwrt_1
ROOT_PW=changeme123
## Docker network settings ## Docker network settings
# name of the WAN Docker network # name of the WAN Docker network