Skip to content

Commit

Permalink
Merge pull request #4 from ba-st/codeloading
Browse files Browse the repository at this point in the history
Add docker image for loading pharo code
  • Loading branch information
gcotelli authored Apr 28, 2022
2 parents 64bd3c9 + e22625e commit 1f1a095
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Build and Publish Docker images
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
Expand All @@ -38,4 +38,18 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
secrets: GIT_AUTH_TOKEN=${{ secrets.DOCKER_REGISTRY_TOKEN }}
secrets: GIT_AUTH_TOKEN=${{ secrets.DOCKER_REGISTRY_TOKEN }}
- name: Docker meta loader
id: docker_meta_loader
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ghcr.io/${{ github.repository_owner }}/pharo-loader
- name: Docker build and push loader
uses: docker/build-push-action@v2
with:
context: ./source
file: ./source/Dockerfile-loader
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta_loader.outputs.tags }}
labels: ${{ steps.docker_meta_loader.outputs.labels }}
secrets: GIT_AUTH_TOKEN=${{ secrets.DOCKER_REGISTRY_TOKEN }}
18 changes: 18 additions & 0 deletions docs/how-to-guides/how-to-use-as-dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,21 @@ In your `Dockerfile` put something like:
```dockerfile
FROM ghcr.io/ba-st/pharo:v10.0.0
```

If you want to create a custom Pharo image it's better to use multi-stage builds
using `pharo-loader` as the base to load the code. This image disables Epicea and
configure Iceberg to use HTTPS.

For example

```dockerfile
FROM ghcr.io/ba-st/pharo-loader:v10.0.0 AS loader
RUN pharo metacello install github://owner/repo:branch BaselineOfProject

FROM ghcr.io/ba-st/pharo:v10.0.0
COPY --from=loader /opt/pharo/Pharo.image ./
COPY --from=loader /opt/pharo/Pharo.changes ./
COPY --from=loader /opt/pharo/Pharo*.sources ./

...
```
3 changes: 3 additions & 0 deletions source/Dockerfile-loader
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ghcr.io/ba-st/pharo:v10.0.0
RUN pharo eval --save "EpMonitor current disable"
RUN pharo eval --save "Iceberg remoteTypeSelector: #httpsUrl"

0 comments on commit 1f1a095

Please sign in to comment.