Skip to content
Open
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
21 changes: 18 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ COPY --from=xschem ${TOOLS}/ ${TOOLS}/
# COPY --from=xyce-xdm ${TOOLS}/ ${TOOLS}/
COPY --from=klayout ${TOOLS}/ ${TOOLS}/

COPY tools/tools.bashrc /foss/tools/tools.bashrc
RUN echo 'source /foss/tools/tools.bashrc' >> ~/.bashrc

# Allow scripts to be executed by any user
# RUN find $STARTUPDIR/scripts -name '*.sh' -exec chmod a+x {} +

Expand All @@ -149,3 +146,21 @@ RUN echo 'source /foss/tools/tools.bashrc' >> ~/.bashrc
# USER 1000:1000
# ENTRYPOINT ["/dockerstartup/scripts/ui_startup.sh"]
# CMD ["--wait"]

# Add the non-root
ARG USERNAME="vscode"
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m -s /bin/bash $USERNAME \
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

USER $USERNAME

# Prepare bashrc
COPY tools/tools.bashrc /foss/tools/tools.bashrc
RUN echo 'source /foss/tools/tools.bashrc' >> ~/.bashrc
4 changes: 2 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ tasks:
cmds:
- docker build --pull --rm -f "Dockerfile"
-t ghcr.io/cascode-labs/viper-osic-docker-analog/osic-docker-analog:latest
-t ghcr.io/cascode-labs/viper-osic-docker-analog/osic-docker-analog:v0.2
-t ghcr.io/cascode-labs/viper-osic-docker-analog/osic-docker-analog:v0.3
"."
push:
desc: Push the image to GitHub container registry
deps: [build]
cmds:
- docker push ghcr.io/cascode-labs/viper-osic-docker-analog/osic-docker-analog:latest
- docker push ghcr.io/cascode-labs/viper-osic-docker-analog/osic-docker-analog:v0.2
- docker push ghcr.io/cascode-labs/viper-osic-docker-analog/osic-docker-analog:v0.3

run:
desc: Run the doker image
Expand Down
4 changes: 3 additions & 1 deletion tools/klayout/install_base
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

echo "[INFO] Adding Klayout APT Packages"
apt-get -y install \
apt-get -y install --fix-missing \
gcc \
g++ \
make \
Expand All @@ -18,3 +18,5 @@ apt-get -y install \
python3-dev \
libz-dev \
libgit2-dev

strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5