Skip to content

Commit 4627514

Browse files
lijianguoduanhongyi
authored andcommitted
chore(dockerfile): use uid gid
1 parent 8b9e3ba commit 4627514

5 files changed

Lines changed: 14 additions & 34 deletions

File tree

.drone/drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ steps:
126126
commands:
127127
- IMAGE_TAG=$([ ! -z $DRONE_TAG ] && echo \"${DRONE_TAG:1}\" || echo \"canary\")
128128
- sed -i "s/imageTag:\ \"canary\"/imageTag:\ $IMAGE_TAG/g" charts/builder/values.yaml
129-
- helm package charts/builder --version ${DRONE_TAG:-v1.0.0}
129+
- helm package -u charts/builder --version ${DRONE_TAG:-v1.0.0}
130130
- curl -u $CHARTMUSEUM_USERNAME:$CHARTMUSEUM_PASSWORD -F chart=@builder-${DRONE_TAG:-v1.0.0}.tgz "$CHARTMUSEUM_API/api/$([ -z $DRONE_TAG ] && echo testing || echo stable)/charts"
131131
environment:
132132
CHARTMUSEUM_USERNAME:

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ RUN export GO111MODULE=on \
88

99
FROM docker.io/drycc/base:bullseye
1010

11-
ARG DRYCC_UID=1001
12-
ARG DRYCC_GID=1001
13-
ARG DRYCC_HOME_DIR=/workspace
11+
ENV DRYCC_UID=1001 \
12+
DRYCC_GID=1001 \
13+
DRYCC_HOME_DIR=/workspace \
14+
MC_VERSION="2022.02.26.03.58.31" \
15+
JQ_VERSION="1.6"
1416

1517
RUN groupadd drycc --gid ${DRYCC_GID} \
1618
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}
@@ -20,17 +22,14 @@ COPY rootfs/etc/ssh /etc/ssh/
2022
COPY rootfs/docker-entrypoint.sh /docker-entrypoint.sh
2123
COPY --from=build /usr/local/bin/boot /usr/bin/boot
2224

23-
ENV MC_VERSION="2022.02.26.03.58.31" \
24-
JQ_VERSION="1.6"
25-
2625
RUN install-packages git openssh-server coreutils xz-utils tar \
2726
&& install-stack mc $MC_VERSION \
2827
&& install-stack jq $JQ_VERSION \
2928
&& mkdir -p /var/run/sshd \
3029
&& rm -rf /etc/ssh/ssh_host* \
3130
&& chmod +x /bin/create_bucket /bin/normalize_storage /docker-entrypoint.sh
3231

33-
USER drycc
32+
USER ${DRYCC_UID}
3433
WORKDIR ${DRYCC_HOME_DIR}
3534

3635
ENTRYPOINT ["init-stack", "/docker-entrypoint.sh"]

charts/builder/Chart.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
name: builder
2+
apiVersion: v2
23
home: https://github.com/drycc/builder
3-
version: v1.0.0
4+
dependencies:
5+
- name: common
6+
repository: https://charts.drycc.cc/stable
7+
version: 1.x.x
48
description: Git server and application builder for Drycc Workflow.
59
maintainers:
610
- name: Drycc Team
711
email: engineering@drycc.com
12+
version: v1.0.0

charts/builder/templates/_helpers.tpl

Lines changed: 0 additions & 24 deletions
This file was deleted.

charts/builder/templates/builder-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
labels:
2222
app: drycc-builder
2323
spec:
24-
{{- include "builder.affinity" . | indent 6 }}
24+
{{- include "common.affinities.nodes.soft" (dict "key" "app" "values" (list "drycc-builder")) | indent 6 }}
2525
serviceAccount: drycc-builder
2626
initContainers:
2727
- name: drycc-builder-init

0 commit comments

Comments
 (0)