Skip to content

Commit 8ec4048

Browse files
committed
unify build context of local build / test and docker hub build
1 parent 1707884 commit 8ec4048

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ lint: ## run hadolint against the Dockerfile
88
docker run --rm -i hadolint/hadolint < src/Dockerfile
99

1010
build: ## build the docker image
11-
docker build --file ./src/Dockerfile --tag aveltens/solid-server .
11+
cd src && docker build --tag aveltens/solid-server .
1212

1313
inspect: build ## run a shell in the docker image
1414
docker run --rm -it --entrypoint sh aveltens/solid-server

src/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ ENV PROCESS_USER=node
1111
ENV TEMPORARY_CERT_NAME=solid-temporary
1212

1313
WORKDIR ${SOLID_HOME}
14-
COPY ./src/entrypoint.sh ./entrypoint.sh
15-
COPY ./src/checks.sh ./checks.sh
16-
COPY ./src/create-temporary-cert.sh ./create-temporary-cert.sh
14+
COPY ./entrypoint.sh ./entrypoint.sh
15+
COPY ./checks.sh ./checks.sh
16+
COPY ./create-temporary-cert.sh ./create-temporary-cert.sh
1717
RUN chown --recursive ${PROCESS_USER}:${PROCESS_USER} ${SOLID_HOME}
1818

1919
USER ${PROCESS_USER}

src/hooks/build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/bash
22

3-
docker build --build-arg SOLID_SERVER_VERSION=${SOURCE_BRANCH} -f Dockerfile -t $IMAGE_NAME .
3+
echo building version ${SOURCE_BRANCH} with image name $IMAGE_NAME .
4+
5+
docker build --build-arg SOLID_SERVER_VERSION=${SOURCE_BRANCH} --file Dockerfile -t $IMAGE_NAME .

test/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ def client():
77

88
@pytest.fixture(scope="session")
99
def image(client):
10-
img, _ = client.images.build(path='./', dockerfile='src/Dockerfile')
10+
img, _ = client.images.build(path='./src', dockerfile='Dockerfile')
1111
return img

0 commit comments

Comments
 (0)