This repository was archived by the owner on Oct 4, 2024. It is now read-only.
File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ RUN apt-get update && \
22
22
WORKDIR /workspace
23
23
COPY . .
24
24
25
- # install runtime from DIST if there is one
26
-
27
25
# install runtime from DIST if there is one
28
26
RUN mkdir -vp /root/.local && \
29
27
if [ -d dist ] ; then \
@@ -40,7 +38,8 @@ RUN mkdir -vp /root/.config /config \
40
38
&& mkdir -vp /storage
41
39
42
40
# make the installed version of gphotos-sync available to non root users
43
- RUN chmod -R a+rx /root/.local
41
+ RUN chmod -R a+rx /root
42
+ ENV HOME=/root
44
43
45
44
VOLUME /config /storage
46
45
Original file line number Diff line number Diff line change 1
1
# locally build a runtime container for testing
2
2
3
+ THIS_DIR=$( dirname $( realpath $0 ) )
4
+ PYTHON_ROOT=$( realpath $THIS_DIR /..)
5
+
3
6
# first make sure a wheel is built
4
7
(
5
- cd ..
8
+ cd ${PYTHON_ROOT}
6
9
pip install build
7
10
rm -r dist
8
11
python -m build --wheel
9
12
)
10
13
11
14
# make the container name the same as the root folder name of this clone
12
- container_name=$( cd .. ; basename $( realpath .) )
15
+ container_name=$( cd ${PYTHON_ROOT} ; basename $( realpath .) )
13
16
echo building $container_name ...
14
17
15
18
# run the build with required build-args for a runtime build
19
+ cd ${THIS_DIR}
16
20
ln -s ../dist .
17
21
docker build --build-arg BASE=python:3.10-slim -t $container_name .. --file ./Dockerfile
18
22
unlink dist
You can’t perform that action at this time.
0 commit comments