-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 1004 Bytes
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 1. Base image
FROM giswqs/pygis:latest
# 2. Metadata (optional)
LABEL maintainer="giswqs@gmail.com"
# 3. Set working directory and switch to root for setup
USER root
WORKDIR /app
# 4. Copy files and set permissions
COPY book/ /app/book/
RUN chown -R $NB_UID:$NB_GID /app/book && chmod -R u+w /app/book
# ✅ Make entire /app directory owned by the notebook user
RUN mkdir -p /app/workspace && \
chown -R $NB_UID:$NB_GID /app && \
chmod -R u+w /app
# 5. Switch to notebook user
USER $NB_UID
# 6. Set default working directory (optional)
WORKDIR /app
# 7. Command to run container
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--no-browser"]
# 8. Mount workspace directory and run container
# docker pull giswqs/pygis:book
# docker run -it -p 8888:8888 -v $(pwd):/app/workspace giswqs/pygis:book
# 9. To build the docker image
# docker build -t giswqs/pygis:book .
# docker buildx build --no-cache --platform linux/amd64,linux/arm64 -t giswqs/pygis:book --push .