Skip to content

Commit 1549d8c

Browse files
author
lijianguo
committed
chore(dockerfile): use drycc/base image
1 parent 9382ec0 commit 1549d8c

3 files changed

Lines changed: 29 additions & 6 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SHELL_SCRIPTS = $(wildcard _scripts/*.sh) rootfs/bin/boot
1414
# The following variables describe the containerized development environment
1515
# and other build options
1616
DEV_ENV_IMAGE := ${DEV_REGISTRY}/drycc/go-dev
17-
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
17+
DEV_ENV_WORK_DIR := /opt/drycc/go/src/${REPO_PATH}
1818
DEV_ENV_CMD := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
1919
DEV_ENV_CMD_INT := docker run -it --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
2020

rootfs/Dockerfile

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
1-
FROM docker.io/library/redis:6-alpine
1+
FROM docker.io/drycc/base:bullseye
22

3-
COPY . /
3+
RUN adduser --system \
4+
--shell /bin/bash \
5+
--disabled-password \
6+
--home /data \
7+
--group \
8+
redis
49

5-
RUN chown -R redis:redis /etc/redis
10+
COPY bin/boot /bin/boot
11+
COPY etc/redis/redis.conf /etc/redis/redis.conf
12+
ENV REDIS_VERSION="6.2.6"
613

7-
USER redis
14+
RUN install-stack redis $REDIS_VERSION \
15+
&& rm -rf \
16+
/usr/share/doc \
17+
/usr/share/man \
18+
/usr/share/info \
19+
/usr/share/locale \
20+
/var/lib/apt/lists/* \
21+
/var/log/* \
22+
/var/cache/debconf/* \
23+
/etc/systemd \
24+
/lib/lsb \
25+
/lib/udev \
26+
/usr/lib/`echo $(uname -m)`-linux-gnu/gconv/IBM* \
27+
/usr/lib/`echo $(uname -m)`-linux-gnu/gconv/EBC* \
28+
&& bash -c "mkdir -p /usr/share/man/man{1..8}" \
29+
&& chown -R redis:redis /etc/redis /data
830

31+
USER redis
932
CMD ["/bin/boot"]
1033
EXPOSE 6379

rootfs/bin/boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22

33
set -eof pipefail
44

0 commit comments

Comments
 (0)