Skip to content

Commit

Permalink
base image
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Neagu committed Nov 25, 2021
1 parent 988b8ad commit d38a2b6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM docker:20.10.11

LABEL org.opencontainers.image.authors="[email protected]"

ARG REPO_NAME="https://github.com/GitHK/osparc-simcore-forked.git"
ARG BRANCH_NAME="service-integration-library-additions"
ARG COMMIT_SHA="a2413944443f03074866d23172b32249140bd288"
ARG CLONE_DIR="/opsarc"

# install & activate python virtuelenv
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN apk add git python3 py3-pip docker-compose && \
python3 -m venv $VIRTUAL_ENV && \
# cloning and and selecting branch
pip install --no-cache-dir --upgrade pip && \
git clone -n ${REPO_NAME} ${CLONE_DIR} && \
cd ${CLONE_DIR} && \
git checkout -b ${BRANCH_NAME} ${COMMIT_SHA} && \
# install ooil and requirements
cd ${CLONE_DIR}/packages/service-integration && \
pip install --no-cache-dir -r requirements/prod.txt && \
pip install --no-cache-dir . && \
cd / && \
# remove source directory
rm -rf ${CLONE_DIR} && \
# check it is working
ooil --version
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: build
build: ## Builds current image
docker build -t dockerhub-service-integrationlibrary .

.PHONY: shell
shell: ## Builds current image
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock dockerhub-service-integrationlibrary /bin/sh

0 comments on commit d38a2b6

Please sign in to comment.