Switched base container for the docker build (#57)

This commit is contained in:
Redblueflame 2020-08-29 16:56:50 +02:00 committed by GitHub
parent a8340f37bb
commit 2196b53075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View File

@ -1,2 +1,3 @@
target
.env
.env
Dockerfile

View File

@ -16,10 +16,9 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: modrinth/labrinth/labrinth
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: modrinth/labrinth
tag_with_ref: false
tags: master
tag_with_sha: true

View File

@ -17,10 +17,9 @@ jobs:
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: modrinth/labrinth/labrinth
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: modrinth/labrinth
tag_with_ref: true
tags: latest
tag_with_sha: true

View File

@ -2,8 +2,8 @@ name: Docker image build
on:
push:
branches:
- !master
branches-ignore:
- master
pull_request:
env:
CARGO_TERM_COLOR: always

View File

@ -23,10 +23,11 @@ ARG SQLX_OFFLINE=true
RUN cargo build --release
FROM gcr.io/distroless/cc-debian10
COPY --from=build /usr/src/labrinth/target/release/labrinth /labrinth
COPY --from=build /usr/src/labrinth/target/release/migrations/* /labrinth/migrations/
FROM bitnami/minideb:latest
RUN install_packages openssl
COPY --from=build /usr/src/labrinth/target/release/labrinth /labrinth/labrinth
COPY --from=build /usr/src/labrinth/migrations/* /labrinth/migrations/
COPY --from=build /wait /wait
WORKDIR /labrinth
CMD /wait && /opt/labrinth
CMD /wait && /labrinth/labrinth