@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### Changed
+- docker build stage: revert user after applying `chown` workaround for inter-stage copy
## [0.4.0] - 2020-09-10
### Added
@@ -4,6 +4,7 @@ ARG BASE_IMAGE=alpine:3.11
ARG SOURCE_DIR_PATH=/systemctl-mqtt
+# hadolint ignore=DL3006
FROM $BASE_IMAGE as build
RUN apk add --no-cache \
@@ -38,8 +39,10 @@ RUN pipenv install --deploy --verbose \
# > failed to copy files: failed to copy directory: Error processing tar file(exit status 1): Container ID ... cannot be mapped to a host ID
USER 0
RUN chown -R 0:0 $SOURCE_DIR_PATH
+USER build
FROM $BASE_IMAGE