Skip to content

Commit bdfc69e

Browse files
authored
Merge pull request #50 from RS-PYTHON/feat/rspy402-prip
Feat/rspy402 prip
2 parents 5a1c11a + 9059ae6 commit bdfc69e

20 files changed

+2823
-1
lines changed

.github/workflows/publish-docker.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,26 @@ jobs:
163163
github_token: ${{ secrets.GITHUB_TOKEN }}
164164
docker_tag: ${{ needs.set-env.outputs.docker_tag }}
165165

166+
services-prip-img:
167+
if: github.actor != 'dependabot[bot]'
168+
runs-on: ubuntu-latest
169+
name: "'services/prip' Docker image"
170+
needs: [set-env, pre-actions]
171+
permissions: write-all
172+
outputs:
173+
docker_image: ${{ steps.publish-docker.outputs.docker_image}}
174+
steps:
175+
- uses: actions/checkout@v4
176+
177+
- id: publish-docker
178+
uses: ./.github/actions/publish-docker
179+
with:
180+
dockerfile: ./src/PRIP/Dockerfile
181+
build_context_path: ./src
182+
image_suffix: _prip-station-mock
183+
version_name: ${{ needs.pre-actions.outputs.sha_short }}
184+
github_token: ${{ secrets.GITHUB_TOKEN }}
185+
docker_tag: ${{ needs.set-env.outputs.docker_tag }}
166186
###########
167187
# TESTING #
168188
###########

src/PRIP/Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
FROM ghcr.io/rs-python/python:3.11.7-slim-bookworm
3+
LABEL description="This docker allow to run a PRIP mockup server."
4+
5+
WORKDIR /opt/prip
6+
COPY ./PRIP/prip_station_mock.py /opt/prip
7+
COPY ./PRIP/pyproject.toml /opt/prip
8+
COPY ./PRIP/config /opt/prip/config
9+
# Copy common folder and associated symbolic link
10+
COPY ./common /opt/common
11+
COPY ./PRIP/common /opt/prip/common
12+
13+
# Install poetry
14+
RUN python3.11 -m pip install --no-cache-dir poetry
15+
16+
SHELL ["/bin/bash", "-c"]
17+
RUN poetry install --no-root
18+
19+
# Clean everything
20+
RUN rm -rf /tmp/whl /root/.cache/pip /var/cache/apt/archives /var/lib/apt/lists/*
21+
22+
# Set labels based on the Open Containers Initiative (OCI):
23+
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
24+
#
25+
LABEL org.opencontainers.image.source="https://github.com/RS-PYTHON/rs-testmeans"
26+
LABEL org.opencontainers.image.ref.name="ghcr.io/rs-python/rs-testmeans_prip-station-mock"
27+
LABEL dockerfile.url="https://github.com/RS-PYTHON/rs-testmeans/blob/develop/src/PRIP/Dockerfile"
28+
29+
ENTRYPOINT [ "poetry", "run", "python3.11", "/opt/prip/prip_station_mock.py", "-H", "0.0.0.0" ]

src/PRIP/common

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../common

0 commit comments

Comments
 (0)