Skip to content

Commit

Permalink
attempt to build baremetal reference on separate image without pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
capsulecorplab committed Mar 30, 2024
1 parent 595e740 commit 6202754
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
- name: Checkout github repo
uses: actions/checkout@v4

- name: Build image with baremetal reference
uses: docker/build-push-action@v5
with:
file: ./baremetal.Dockerfile

- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
Expand Down
43 changes: 43 additions & 0 deletions baremetal.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM kasmweb/core-ubuntu-jammy:1.13.0
USER root

LABEL org.opencontainers.image.source="https://github.com/fprime-community/fprime-workspace-image"

ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME

######### Customize Container Here ###########

# copy over install_files/ for use in playbooks
ADD install_files $HOME/install_files

# install Ansible per
# https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu
RUN apt update && apt -y install software-properties-common && add-apt-repository --yes --update ppa:ansible/ansible && apt install -y ansible && rm -rf /var/lib/apt/lists/*

# run Ansible commands
COPY ./requirements.yaml ./playbook.yaml ./
RUN ansible-galaxy install -r requirements.yaml && ansible-playbook -i,localhost playbook.yaml --tags "build_baremetal_reference" && rm -f ./*.yaml

# Custom Desktop Background - replace ingenuity_helicopter_on_mars.png on disk with your own background image
COPY ./ingenuity_helicopter_on_mars.png /usr/share/extra/backgrounds/bg_default.png

# Create .profile and set XFCE terminal to use it
RUN cp /etc/skel/.profile $HOME/.profile && mkdir $HOME/.config/xfce4/terminal/
COPY ./terminalrc /home/kasm-default-profile/.config/xfce4/terminal/terminalrc

# clean up install_files/
RUN rm -rf $HOME/install_files/

######### End Customizations ###########

RUN chown 1000:0 $HOME
RUN $STARTUPDIR/set_user_permission.sh $HOME

ENV HOME /home/kasm-user
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME

USER 1000

0 comments on commit 6202754

Please sign in to comment.