Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix docker image uploads, don't allow confusion over Dockerfiles #1077

Merged
merged 2 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
password: ${{ secrets.GITHUBSAW }}
repository: galoisinc/saw
tags: "latest,${{ steps.outputs.outputs.saw-version }}"
dockerfile: saw/Dockerfile
add_git_labels: true
push: true
saw-remote-api:
Expand All @@ -39,6 +40,6 @@ jobs:
password: ${{ secrets.GITHUBSAW }}
repository: galoisinc/saw-remote-api
tags: "latest,${{ steps.outputs.outputs.saw-version }}"
file: Dockerfile-remote-api
dockerfile: saw-remote-api/Dockerfile
add_git_labels: true
push: true
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
password: ${{ secrets.GITHUBSAW }}
repository: galoisinc/saw
tags: "nightly"
dockerfile: saw/Dockerfile
add_git_labels: true
push: ${{ github.event_name == 'schedule' }}

Expand All @@ -57,7 +58,7 @@ jobs:
password: ${{ secrets.GITHUBSAW }}
repository: galoisinc/saw-remote-api
tags: "nightly"
file: Dockerfile-remote-api
dockerfile: saw-remote-api/Dockerfile
add_git_labels: true
push: ${{ github.event_name == 'schedule' }}

Expand Down
72 changes: 0 additions & 72 deletions Dockerfile-remote-api

This file was deleted.

17 changes: 7 additions & 10 deletions saw-remote-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,23 @@ RUN useradd -m saw
COPY --chown=saw:saw . /home/saw
USER saw
WORKDIR /home/saw
ARG CRYPTOLPATH="/cryptol/.cryptol"
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
COPY cabal.GHC-8.8.4.config cabal.project.freeze
RUN mkdir -p rootfs/usr/local/bin
RUN cabal v2-update && \
cabal v2-build -j saw-remote-api:exe:saw-remote-api && \
cp $(cabal v2-exec which saw-remote-api) rootfs/usr/local/bin
RUN mkdir -p rootfs/"${CRYPTOLPATH}" \
&& cp -r deps/cryptol/lib/* rootfs/"${CRYPTOLPATH}"
RUN cabal v2-update && cabal v2-build -j exe:saw-remote-api
RUN mkdir -p /home/saw/rootfs/usr/local/bin
RUN cp $(cabal v2-exec which saw-remote-api) /home/saw/rootfs/usr/local/bin/saw-remote-api
WORKDIR /home/saw
USER root
RUN chown -R root:root /home/saw/rootfs

FROM debian:buster-slim
RUN apt-get update \
&& apt-get install -y libgmp10 libgomp1 libffi6 wget libncurses5 unzip \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN useradd -m saw && chown -R saw:saw /home/saw
&& apt-get install -y libgmp10 libgomp1 libffi6 wget libncurses5 unzip
COPY --from=build /home/saw/rootfs /
COPY --from=solvers /solvers/rootfs /
RUN useradd -m saw && chown -R saw:saw /home/saw
USER saw
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
ENTRYPOINT ["/usr/local/bin/saw-remote-api"]
Expand Down
File renamed without changes.