fix(drone): use full commit SHA for Docker tag and fix non-interactive adduser
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
- Replace bash substring syntax ${DRONE_COMMIT_SHA:0:7} with
${DRONE_COMMIT_SHA} which is supported by Drone YAML variables
- Use 'adduser -D -g ""' in Dockerfile to skip interactive prompts
for user information during Docker image build
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ steps:
|
||||
context: .
|
||||
registry: gitea.jambotron.com
|
||||
repo: gitea.jambotron.com/liosha84/htop-web
|
||||
tags: ${DRONE_COMMIT_SHA:0:7},main-latest
|
||||
tags: ${DRONE_COMMIT_SHA},main-latest
|
||||
username:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
password:
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ FROM eclipse-temurin:21-jre
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/build/libs/backend-0.0.1-SNAPSHOT.jar app.jar
|
||||
|
||||
RUN adduser --disabled-password --no-create-home appuser && \
|
||||
RUN adduser -D -g "" appuser && \
|
||||
chown appuser:appuser /app
|
||||
USER appuser
|
||||
|
||||
|
||||
Reference in New Issue
Block a user