Skip to content

Commit

Permalink
added docker compose version build argument
Browse files Browse the repository at this point in the history
  • Loading branch information
broizter committed Mar 4, 2024
1 parent 55c6b49 commit 3d07596
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
- name: Build and push the image
run: |
docker login --username broizter --password ${{ secrets.GH_PAT }} ghcr.io
docker build . --tag ghcr.io/broizter/ssh-server-on-docker-with-docker:1.0 --tag ghcr.io/broizter/ssh-server-on-docker-with-docker:latest
docker build . --tag ghcr.io/broizter/ssh-server-on-docker-with-docker:1.0-1 --tag ghcr.io/broizter/ssh-server-on-docker-with-docker:latest
docker push ghcr.io/broizter/ssh-server-on-docker-with-docker --all-tags
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM debian:bookworm

LABEL build_version="1.0"
ARG COMPOSE_VERSION=v2.24.6
LABEL build_version="1.0-1"

RUN apt-get update && apt-get install --no-install-recommends -y openssh-server curl ca-certificates fish && \
usermod -s /usr/bin/fish root && \
Expand All @@ -13,7 +14,7 @@ if ! [ -d /root/.ssh ]; then mkdir /root/.ssh ; fi && \
if ! [ -f /root/.ssh/authorized_keys ] ; then touch /root/.ssh/authorized_keys ; fi && \
chmod 700 /root/.ssh && \
chmod 400 /root/.ssh/authorized_keys && \
curl -L https://github.com/docker/compose/releases/download/v2.24.6/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose && \
curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose && \
if ! [ -d /root/.config/fish ]; then mkdir -p /root/.config/fish ; fi && \
echo abbr -a dc docker-compose -f /docker/docker-compose.yml | tee -a /root/.config/fish/config.fish
Expand Down

0 comments on commit 3d07596

Please sign in to comment.