Skip to content

Commit

Permalink
Merge pull request #15 from DUNE-DAQ/tinyproxy
Browse files Browse the repository at this point in the history
Add simple container for tinyproxy
  • Loading branch information
dingp authored Jul 12, 2023
2 parents 994562f + 7a6a640 commit 2a107e4
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/tinyproxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build c8-spack docker image

on:
schedule:
- cron: "0 5 * * 2"

push:
branches: [ develop ]
tags:
- 'v*'
paths:
- dockerfiles/tinyproxy.dockerfile

workflow_dispatch:

jobs:

push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
repository: DUNE-DAQ/daq-docker
path: daq-docker

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/DUNE-DAQ/tinyproxy
tags: |
type=raw,value=latest
type=ref,event=branch
type=ref,event=tag
- name: prepare build dir
run: |
build_dir="${{ github.workspace }}/docker-build"
mkdir -p $build_dir
cd $build_dir
cp ${{ github.workspace }}/daq-docker/dockerfiles/tinyproxy.dockerfile $build_dir/Dockerfile
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
context: ${{ github.workspace }}/docker-build
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
11 changes: 11 additions & 0 deletions dockerfiles/tinyproxy.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM docker.io/library/alpine:latest

ENV REFRESHED_AT 2023-07-08

EXPOSE 8888

RUN apk add tinyproxy && apk cache clean

USER nobody:nobody
WORKDIR /tmp
CMD ["/usr/bin/tinyproxy", "-d"]

0 comments on commit 2a107e4

Please sign in to comment.