14 lines
693 B
Docker
14 lines
693 B
Docker
# Replace the example mirror with the qualified platform mirror before importing this repo.
|
|
FROM docker.io/library/python@sha256:5dcbe6043e931f65945060c7a991d55035191d7dfc52c8bed14468e95b8f7b9a AS prepare
|
|
WORKDIR /app
|
|
COPY marker.txt /app/input.txt
|
|
RUN mkdir -p /app/data && cp /app/input.txt /app/data/marker.txt && chown -R 1000:1000 /app/data
|
|
USER 1000:1000
|
|
RUN test "$(id -u)" = 1000 && test -r /app/data/marker.txt
|
|
|
|
FROM docker.io/library/python@sha256:5dcbe6043e931f65945060c7a991d55035191d7dfc52c8bed14468e95b8f7b9a
|
|
COPY --from=prepare --chown=1000:1000 /app/data/marker.txt /tmp/marker.txt
|
|
USER 1000:1000
|
|
EXPOSE 8080
|
|
CMD ["python3", "-m", "http.server", "8080", "--directory", "/tmp"]
|